#477 Memory leak: outName

closed-duplicate
nobody
None
1
2009-03-10
2009-03-10
Bill Egert
No

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?

Discussion

  • Bill Egert

    Bill Egert - 2009-03-10

    don't know how I submitted this twice...sorry.

     
  • Bill Egert

    Bill Egert - 2009-03-10
    • priority: 5 --> 1
    • status: open --> closed-duplicate
     

Log in to post a comment.