parser/glob.c, bug fix, access to already freed memory
This commit is contained in:
parent
a5817192e1
commit
d9e0ae3504
|
|
@ -74,7 +74,7 @@ cp_doglob(wordlist *wlist)
|
||||||
s = cp_tildexpand(wl->wl_word);
|
s = cp_tildexpand(wl->wl_word);
|
||||||
txfree(wl->wl_word); /* sjb - fix memory leak */
|
txfree(wl->wl_word); /* sjb - fix memory leak */
|
||||||
if (!s)
|
if (!s)
|
||||||
*wl->wl_word = '\0'; /* MW. We Con't touch tmalloc addres */
|
wl->wl_word = copy(""); /* MW. We Con't touch tmalloc addres */
|
||||||
else
|
else
|
||||||
wl->wl_word = s;
|
wl->wl_word = s;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue