summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2014-01-26 07:20:32 +0000
committerkevlo <kevlo@FreeBSD.org>2014-01-26 07:20:32 +0000
commitc90ebc96998928a5fed0ddce1bb583fc099ca9da (patch)
tree699bcdd4c934d73673e96273405546da6981bc40 /bin
parent741e52a6b9b63535507afa219c9d9b0a7c742c7b (diff)
downloadFreeBSD-src-c90ebc96998928a5fed0ddce1bb583fc099ca9da.zip
FreeBSD-src-c90ebc96998928a5fed0ddce1bb583fc099ca9da.tar.gz
Stop the options string leak if it is not attached into the options
linked list. Obtained from: OpenBSD
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 32d967e..c6ebea2 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -1385,6 +1385,7 @@ opt_add(const char *str)
free(lstr);
return(-1);
}
+ lstr = NULL; /* parts of string going onto the OPLIST */
*pt++ = '\0';
opt->name = frpt;
opt->value = pt;
@@ -1400,6 +1401,7 @@ opt_add(const char *str)
optail->fow = opt;
optail = opt;
}
+ free(lstr);
return(0);
}
OpenPOWER on IntegriCloud