Fix Bug #402 "Crash related to aliases". Do not return freed pointer.
This commit is contained in:
parent
16f619818e
commit
39b837a405
|
|
@ -97,8 +97,8 @@ cp_doalias(wordlist *wlist)
|
||||||
|
|
||||||
if (!ntries) {
|
if (!ntries) {
|
||||||
fprintf(cp_err, "Error: alias loop.\n");
|
fprintf(cp_err, "Error: alias loop.\n");
|
||||||
wlist->wl_word = NULL;
|
wl_free(comm);
|
||||||
return (wlist);
|
return wl_cons(NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_append(end, comm);
|
wl_append(end, comm);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue