summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:20:12 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:20:12 +0000
commita33c030d60722d35b1896596795d99b30ba91477 (patch)
tree66da3a98d8f2c826e1a13c16f18200a01677fcb0 /src
parentbc5901dd28b9a277d20c640bed519457c67beb5c (diff)
Fixed null pointer deallocation
git-svn-id: http://pugixml.googlecode.com/svn/trunk@655 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index c6f74e7..3238a3d 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -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);