You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/08/27 07:36:56 UTC

DO NOT REPLY [Bug 12063] New: - Memory error when freeing string returned by XMLString::transcode

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12063>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12063

Memory error when freeing string returned by XMLString::transcode

           Summary: Memory error when freeing string returned by
                    XMLString::transcode
           Product: Xerces-C++
           Version: 1.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: DOM
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: rajuwork@yahoo.com


XMLString::transcode returns a char * which according to the doc is supposed to
be  freed. I put the necessary frees in the code.

As the application code grew, at some point I got a segmentation fault.
I ran the application under "valgrind" and found that the there was a problem
with the free.

1  char *data = XMLString::transcode(xmldata);
2  free(data);

valgrind reports a mismatched free for line 2.
I got rid of the frees and valgrind did not report a memory leak

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org