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
last_argument(void)
{
unsigned char **av;
unsigned char **av = NULL;
unsigned char *p;
el_STATUS s;
int ac;
@@ -1318,7 +1318,7 @@ last_argument(void)
else
s = ac ? insert_string(av[ac - 1]) : CSstay;
if (ac)
if (av)
free(av);
free(p);
return s;