Discussion:
[Expat-bugs] [ expat-Bugs-2680699 ] Memory leak: outName
SourceForge.net
2012-03-05 19:00:51 UTC
Permalink
Bugs item #2680699, was opened at 2009-03-10 16:46
Message generated for change (Comment added) made by kwaclaw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2680699&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Not a Bug
Status: Closed
Resolution: Rejected
Priority: 5
Private: No
Submitted By: Bill Egert (boogachamp)
Assigned to: Karl Waclawek (kwaclaw)
Summary: Memory leak: outName

Initial Comment:
Using cppcheck 1.30 against expat 2.0.1 yeilds:

cppcheck -j2 -a -s -q .
[./xmlwf/xmlwf.c:857]: (all) Memory leak: outName

.
.
.
if (outputDir) {
if (outputType == 'm')
metaEndDocument(parser);
fclose(fp);
if (!result)
tremove(outName);
free(outName);
}
XML_ParserFree(parser);
}
return 0;
}

shouldn't outName be freed regardless of outputDir's value?



----------------------------------------------------------------------
Comment By: Karl Waclawek (kwaclaw)
Date: 2012-03-05 11:00

Message:
I looked at the code, and outName is only allocated when outputDir !=
null.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2680699&group_id=10127
Loading...