Oops, don't access variable after freeing
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 7 May 2008 09:15:22 +0000 (12:15 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 7 May 2008 09:15:22 +0000 (12:15 +0300)
lib/rpminstall.c

index 9b4d95f..86ea1b7 100644 (file)
@@ -605,11 +605,12 @@ exit:
     eiu->pkgState = _free(eiu->pkgState);
     eiu->pkgURL = _free(eiu->pkgURL);
     eiu->argv = _free(eiu->argv);
+    rc = eiu->numFailed;
     free(eiu);
 
     rpmtsEmpty(ts);
 
-    return eiu->numFailed;
+    return rc;
 }
 
 int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t argv)