Fixed null pointer deallocation
git-svn-id: http://pugixml.googlecode.com/svn/trunk@655 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
bc5901dd28
commit
a33c030d60
@ -4464,7 +4464,7 @@ namespace pugi
|
||||
if (!convert_buffer(buffer, length, buffer_encoding, contents, size, is_mutable)) return make_parse_result(status_out_of_memory);
|
||||
|
||||
// delete original buffer if we performed a conversion
|
||||
if (own && buffer != contents) global_deallocate(contents);
|
||||
if (own && buffer != contents && contents) global_deallocate(contents);
|
||||
|
||||
// parse
|
||||
xml_parse_result res = xml_parser::parse(buffer, length, _root, options);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user