diff --git a/bin/pax/options.c b/bin/pax/options.c index 32d967e1d857..c6ebea28cefc 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); }