summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-11-14 12:50:56 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-11-14 12:50:56 (GMT)
commit85ddfc814f33943199928447b4627d05b0920b99 (patch)
tree2887ce1367bdad15cde3b7355d134321fcf34762 /src/pre.l
parent0918a19225daedfbd5e23388124a5de3860d5420 (diff)
downloadDoxygen-85ddfc814f33943199928447b4627d05b0920b99.zip
Doxygen-85ddfc814f33943199928447b4627d05b0920b99.tar.gz
Doxygen-85ddfc814f33943199928447b4627d05b0920b99.tar.bz2
Fixed a couple of small memory leaks
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pre.l b/src/pre.l
index 86f9ebb..18f3b1d 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1659,6 +1659,7 @@ static void endCondSection()
{
CondCtx *ctx = g_condStack.pop();
g_skip=ctx->skip;
+ delete ctx;
}
//printf("endCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
}
@@ -1667,7 +1668,7 @@ static void forceEndCondSection()
{
while (!g_condStack.isEmpty())
{
- g_condStack.pop();
+ delete g_condStack.pop();
}
g_skip=FALSE;
}
@@ -3010,8 +3011,8 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
g_includeStack.clear();
g_expandedDict->setAutoDelete(FALSE);
g_expandedDict->clear();
- g_condStack.clear();
g_condStack.setAutoDelete(TRUE);
+ g_condStack.clear();
//g_fileDefineDict->clear();
setFileName(fileName);
@@ -3161,6 +3162,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data());
warn(fileName,ctx->lineNr,"Conditional section%sdoes not have "
"a corresponding \\endcond command within this file.",sectionInfo.data());
+ delete ctx;
}
// make sure we don't extend a \cond with missing \endcond over multiple files (see bug 624829)
forceEndCondSection();