summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/parseScript.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/parseScript.c b/build/parseScript.c
index 95a9fc590..c2dd6136d 100644
--- a/build/parseScript.c
+++ b/build/parseScript.c
@@ -102,6 +102,7 @@ int parseScript(rpmSpec spec, int parsePart)
poptContext optCon = NULL;
char *name = NULL;
char *prog = xstrdup("/bin/sh");
+ char *origprog = prog;
char *file = NULL;
int priority = 1000000;
struct poptOption optionsTable[] = {
@@ -462,6 +463,8 @@ exit:
free(reqargs);
freeStringBuf(sb);
free(progArgv);
+ if (origprog != prog)
+ free(origprog);
free(prog);
free(name);
free(file);