From 6535558f9e3a663cc54833a9fd614a2fdb29e31d Mon Sep 17 00:00:00 2001 From: h_vogt Date: Thu, 4 Aug 2016 23:33:09 +0200 Subject: [PATCH] inp.c, plug memory leak --- src/frontend/inp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/frontend/inp.c b/src/frontend/inp.c index f689652f3..f8cea01a8 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -975,10 +975,9 @@ inp_dodeck( ct->ci_inprogress = FALSE; ct->ci_runonce = FALSE; ct->ci_commands = end; - if (filename) - ct->ci_filename = copy(filename); - else - ct->ci_filename = NULL; + if (reuse) + tfree(ct->ci_filename); + ct->ci_filename = copy(filename); if (!noparse) { /*