summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-10-23 19:05:54 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-10-23 19:05:54 (GMT)
commit2937e44299a615628c27b0a0a7a95ffdf18249ef (patch)
tree15de160465dbdc42f57f7e92e6c0cc3269428a50
parentc98afa68350ed5cbce5a24bee3b47069789cc411 (diff)
downloadDoxygen-2937e44299a615628c27b0a0a7a95ffdf18249ef.zip
Doxygen-2937e44299a615628c27b0a0a7a95ffdf18249ef.tar.gz
Doxygen-2937e44299a615628c27b0a0a7a95ffdf18249ef.tar.bz2
Avoid a (theoretical) memory leak
-rw-r--r--src/pre.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pre.l b/src/pre.l
index ebc6cf8..8d2b5f7 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -2299,7 +2299,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<DefName>{ID}{B}+"1"/[ \r\t\n] { // special case: define with 1 -> can be "guard"
//printf("Define `%s'\n",yytext);
- g_argDict = 0;
+ delete g_argDict; g_argDict=0;
g_defArgs = -1;
g_defArgsStr.resize(0);
g_defName = yytext;
@@ -2328,7 +2328,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_expectGuard=FALSE;
}
<DefName>{ID}/{B}*"\n" { // empty define
- g_argDict = 0;
+ delete g_argDict; g_argDict=0;
g_defArgs = -1;
g_defName = yytext;
g_defArgsStr.resize(0);
@@ -2357,7 +2357,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<DefName>{ID}/{B}* { // define with content
//printf("Define `%s'\n",yytext);
- g_argDict = 0;
+ delete g_argDict; g_argDict=0;
g_defArgs = -1;
g_defArgsStr.resize(0);
g_defText.resize(0);