diff --git a/src/frontend/inp.c b/src/frontend/inp.c index 8bad1a3b1..916853b45 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -1583,7 +1583,7 @@ static void inp_savecurrents(struct line *deck, struct line *options, wordlist * { struct line *tmp_deck, *tmp_line; char beg; - char *devname, *devline, *newline; + char *devname = NULL, *devline, *newline; bool goon = FALSE, havesave = FALSE; wordlist *tmpword; @@ -1686,6 +1686,7 @@ static void inp_savecurrents(struct line *deck, struct line *options, wordlist * default: ; } + tfree(devname); } while((*wl)->wl_prev) (*wl) = (*wl)->wl_prev;