Make sure av is freed if its allocated [CID-73]

This commit is contained in:
Love Hornquist Astrand
2009-07-30 12:40:13 +02:00
parent f3cf321660
commit a5b015ab7e

View File

@@ -1301,7 +1301,7 @@ argify(unsigned char *line, unsigned char ***avp)
static el_STATUS static el_STATUS
last_argument(void) last_argument(void)
{ {
unsigned char **av; unsigned char **av = NULL;
unsigned char *p; unsigned char *p;
el_STATUS s; el_STATUS s;
int ac; int ac;
@@ -1318,7 +1318,7 @@ last_argument(void)
else else
s = ac ? insert_string(av[ac - 1]) : CSstay; s = ac ? insert_string(av[ac - 1]) : CSstay;
if (ac) if (av)
free(av); free(av);
free(p); free(p);
return s; return s;