Browse Source

parser/glob.c, bug fix, access to already freed memory

pre-master-46
rlar 10 years ago
parent
commit
d9e0ae3504
  1. 2
      src/frontend/parser/glob.c

2
src/frontend/parser/glob.c

@ -74,7 +74,7 @@ cp_doglob(wordlist *wlist)
s = cp_tildexpand(wl->wl_word);
txfree(wl->wl_word); /* sjb - fix memory leak */
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
wl->wl_word = s;
}

Loading…
Cancel
Save