Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
2514ba72
Commit
2514ba72
authored
Feb 03, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory leak in nested comment administration
parent
0dc96d28
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
commentcnv.l
src/commentcnv.l
+4
-4
No files found.
src/commentcnv.l
View file @
2514ba72
...
...
@@ -646,7 +646,7 @@ void replaceComment(int offset);
else
{
g_nestingCount--;
CommentCtx *ctx =
g_commentStack.pop();
delete
g_commentStack.pop();
}
}
}
...
...
@@ -988,7 +988,6 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
if (g_lang==SrcLangExt_Markdown)
{
g_nestingCount=0;
g_commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
}
...
...
@@ -1007,14 +1006,15 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
}
if (g_nestingCount>0 || (YY_START==CComment && g_lang!=SrcLangExt_Markdown))
{
QString tmp= "(probable line reference: ";
Q
C
String tmp= "(probable line reference: ";
bool first = TRUE;
while (!g_commentStack.isEmpty())
{
CommentCtx *ctx = g_commentStack.pop();
if (!first) tmp += ", ";
tmp += Q
String::number
(ctx->lineNr);
tmp += Q
CString().setNum
(ctx->lineNr);
first = FALSE;
delete ctx;
}
tmp += ")";
warn(g_fileName,g_lineNr,"Reached end of file while still inside a (nested) comment. "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment