From 6558956b6e99c810530888a3e1121a10d77a74c7 Mon Sep 17 00:00:00 2001 From: ewt Date: Tue, 9 Sep 1997 21:00:48 +0000 Subject: [PATCH] pre/post script processing had some erroneous free() calls CVS patchset: 1818 CVS date: 1997/09/09 21:00:48 --- CHANGES | 1 + lib/uninstall.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 9fa0a4e..f8d2381 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ - updated fine-requires (Linux version) to add lines for shell scripts (Donnie Barnes) - didn't package / properly + - pre/post script processing had some erroneous free() calls 2.4.5 -> 2.4.6: - added os_canon entries for BSD/OS and NextStep diff --git a/lib/uninstall.c b/lib/uninstall.c index 9c1f9a1..1b528ca 100644 --- a/lib/uninstall.c +++ b/lib/uninstall.c @@ -404,8 +404,10 @@ int runScript(char * prefix, Header h, int scriptTag, int progTag, waitpid(child, &status, 0); - if (script && !isdebug) unlink(fn); - free(fn); + if (script) { + if (!isdebug) unlink(fn); + free(fn); + } if (!WIFEXITED(status) || WEXITSTATUS(status)) { rpmError(RPMERR_SCRIPT, _("execution of script failed")); -- 2.7.4