diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2007-10-30 20:24:40 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2007-10-30 20:24:40 +0000 |
commit | 2a512dac2dc607e612882ea9ae3aaef88d0de585 (patch) | |
tree | 37d2bab8c25a00ae41cc69688218d6a0ed83e138 /xmlmemory.c | |
parent | 1bc8d853ebc56a7f6058ad655f0a5fdf190476f2 (diff) | |
download | android_external_libxml2-2a512dac2dc607e612882ea9ae3aaef88d0de585.tar.gz android_external_libxml2-2a512dac2dc607e612882ea9ae3aaef88d0de585.tar.bz2 android_external_libxml2-2a512dac2dc607e612882ea9ae3aaef88d0de585.zip |
xmlFree(NULL) should not crash in debug mode should fix #491651 Daniel
* xmlmemory.c: xmlFree(NULL) should not crash in debug mode
should fix #491651
Daniel
svn path=/trunk/; revision=3662
Diffstat (limited to 'xmlmemory.c')
-rw-r--r-- | xmlmemory.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmlmemory.c b/xmlmemory.c index 362a0b09..f9019a42 100644 --- a/xmlmemory.c +++ b/xmlmemory.c @@ -409,6 +409,9 @@ xmlMemFree(void *ptr) size_t size; #endif + if (ptr == NULL) + return; + if (ptr == (void *) -1) { xmlGenericError(xmlGenericErrorContext, "trying to free pointer from freed area\n"); |