From 893157b11f5c9d342c42247c412435c4586a5606 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Wed, 15 Jun 2016 21:06:28 +0200 Subject: [PATCH] inp.c, inp_savecurrents(), remove a memory leak --- src/frontend/inp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;