glob.c, brac1(), fix a memory leak
This commit is contained in:
parent
841f2846fe
commit
0443a2690c
|
|
@ -143,6 +143,7 @@ brac1(char *string)
|
||||||
newwl = wl_append(newwl, nw);
|
newwl = wl_append(newwl, nw);
|
||||||
}
|
}
|
||||||
wl_free(words);
|
wl_free(words);
|
||||||
|
wl_free(nwl);
|
||||||
words = newwl;
|
words = newwl;
|
||||||
} else {
|
} else {
|
||||||
for (wl = words; wl; wl = wl->wl_next)
|
for (wl = words; wl; wl = wl->wl_next)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue