From a2384d61fd56a5f7dbc4d574511751a902fa8895 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 30 Aug 2009 01:32:42 +0000 Subject: [PATCH] Including new files interrupted the current one and leaked memory --- src/parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parser.c b/src/parser.c index 4066f53..c5f6854 100644 --- a/src/parser.c +++ b/src/parser.c @@ -931,6 +931,7 @@ int cppparser_include(CppParser * cp, char const * include) if((path = _include_path(cp, include)) == NULL) return -1; + for(; cp->subparser != NULL; cp = cp->subparser); cp->subparser = cppparser_new(cp->cpp, cp, path, cp->filters); free(path); return (cp->subparser != NULL) ? 0 : -1;