Fix Bug #402 "Crash related to aliases". Do not return freed pointer.

This commit is contained in:
Giles Atkinson 2022-04-21 10:17:03 +01:00 committed by Holger Vogt
parent 2aa950fe9c
commit 724cf4e638
1 changed files with 2 additions and 2 deletions

View File

@ -97,8 +97,8 @@ cp_doalias(wordlist *wlist)
if (!ntries) {
fprintf(cp_err, "Error: alias loop.\n");
wlist->wl_word = NULL;
return (wlist);
wl_free(comm);
return wl_cons(NULL, NULL);
}
wl_append(end, comm);