Browse Source

simon says leaking is better than crashing

migration/unlabaled-1.3.2
Sterling Hughes 23 years ago
parent
commit
6fc9fdeefc
  1. 9
      ext/simplexml/simplexml.c

9
ext/simplexml/simplexml.c

@ -783,12 +783,13 @@ sxe_object_dtor(void *object, zend_object_handle handle TSRMLS_DC)
sxe = (php_sxe_object *) object;
FREE_HASHTABLE(sxe->zo.properties);
if (--sxe->document->refcount <= 0) {
xmlFreeDoc(sxe->document->ptr);
if (--sxe->document->refcount > 0) {
return;
}
xmlFreeDoc(sxe->document->ptr);
FREE_HASHTABLE(sxe->zo.properties);
if (sxe->xpath) {
xmlXPathFreeContext(sxe->xpath);
}

Loading…
Cancel
Save