Plug memleak from rpmSpecCheckDeps()
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 14 Sep 2010 06:44:06 +0000 (09:44 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 14 Sep 2010 06:45:58 +0000 (09:45 +0300)
- We need to call rpmtsEmpty(), not rpmtsClean() to purge the
  transaction elements in the set...

build/spec.c

index 1fc1554..a0749bf 100644 (file)
@@ -319,13 +319,13 @@ rpmps rpmSpecCheckDeps(rpmts ts, rpmSpec spec)
 {
     rpmps probs = NULL;
 
-    rpmtsClean(ts);
+    rpmtsEmpty(ts);
 
     rpmtsAddInstallElement(ts, spec->sourceHeader, NULL, 0, NULL);
     rpmtsCheck(ts);
     probs = rpmtsProblems(ts);
 
-    rpmtsClean(ts);
+    rpmtsEmpty(ts);
     return probs;
 }