[ expat-Bugs-830367 ] Multiple Calls to XML_ParserFree
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.text.xml.expat.bugs |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #830367, was opened at 2003-10-26 01:25 Message generated for change (Comment added) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=830367&group_id=10127 Category: None Group: None >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Multiple Calls to XML_ParserFree Initial Comment: Version: 1.95.7 Calling XML_ParserFree on the same parser object multiple times causes an access violation error. ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2003-10-26 13:31 Message: Logged In: YES user_id=290026 Closed - not a bug. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2003-10-26 03:22 Message: Logged In: YES user_id=290026 However, your report made me see that XML_ParserFree() is not null-safe, that is, it does not check its argument for Null. Now, this is not the case you described, but if you nulled every pointer that you freed, then you could pass the same pointer variable to XML_ParserFree() again, and the null test would prevent an access violation. I just checked in a fix (xmlparse.c rev. 1.118). ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2003-10-26 02:54 Message: Logged In: YES user_id=290026 That is because you are not supposed to do that. Just like you are not supposed to free any allocated memory more than once. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=830367&group_id=10127