From 3f5c10e9f6eb91bdfb8909c0e5e75a019315ccbf Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 17 Nov 2010 15:54:38 +0200 Subject: [PATCH] Plug a minor memory leak in librpmbuild doPatch() --- build/parsePrep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/parsePrep.c b/build/parsePrep.c index af31acd..ac671cc 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -103,7 +103,6 @@ static char *doPatch(rpmSpec spec, uint32_t c, int strip, const char *db, patchcmd = rpmExpand("%{uncompress: ", fn, "} | %{__patch} ", args, NULL); - free(arg_patch_flags); free(arg_fuzz); free(arg_dir); free(arg_backup); @@ -121,6 +120,7 @@ static char *doPatch(rpmSpec spec, uint32_t c, int strip, const char *db, free(patchcmd); exit: + free(arg_patch_flags); free(fn); return buf; } -- 2.7.4