Including new files interrupted the current one and leaked memory

This commit is contained in:
Pierre Pronchery 2009-08-30 01:32:42 +00:00
parent 95be2c81be
commit a2384d61fd

View File

@ -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;