From 79dd50f94d94158e03fd57a72a896f8fc20f61ec Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 7 May 2008 12:15:22 +0300 Subject: [PATCH] Oops, don't access variable after freeing --- lib/rpminstall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 9b4d95f..86ea1b7 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -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) -- 2.7.4