From be179670d9d2703e433869d689bd30251c6ddb72 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 23 Aug 2002 14:02:01 +0000 Subject: Just had a play with this newfangled `valgrind' memory debugger thingy, which seems moderately cool and has reported a few very small memory leaks. Now apparently fixed. [originally from svn r1863] --- input.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'input.c') diff --git a/input.c b/input.c index 2e0dabf..d4ecaeb 100644 --- a/input.c +++ b/input.c @@ -547,7 +547,7 @@ static void read_file(paragraph ***ret, input *in, indexdata *idx) { } already = FALSE; if (t.type == tok_eof) - return; + break; /* * Parse code paragraphs separately. @@ -1181,6 +1181,11 @@ static void read_file(paragraph ***ret, input *in, indexdata *idx) { stk_free(parsestk); addpara(par, ret); } + + /* + * We break to here rather than returning, because otherwise + * this cleanup doesn't happen. + */ dtor(t); macrocleanup(macros); } -- cgit v1.1