Browse Source

Fixed bug #46110 (XMLWriter - openmemory() and openuri() leak memory on


			
			
				PECL
			
			
		
Ilia Alshanetsky 18 years ago
parent
commit
4732ab390c
  1. 2
      NEWS
  2. 6
      ext/xmlwriter/php_xmlwriter.c

2
NEWS

@ -53,6 +53,8 @@ PHP NEWS
- Fixed a bug causing miscalculations with the "last <weekday> of <n> month"
relative time string. (Derick)
- Fixed bug #46110 (XMLWriter - openmemory() and openuri() leak memory on
multiple calls). (Ilia)
- Fixed bug #46032 (PharData::__construct() wrong memory read). (Greg)
- Fixed bug #45826 (custom ArrayObject serialization). (Etienne)
- Fixed bug #45798 (sqlite3 doesn't notice if variable was bound). (Felipe)

6
ext/xmlwriter/php_xmlwriter.c

@ -1844,6 +1844,9 @@ static PHP_FUNCTION(xmlwriter_open_uri)
intern->uri_output = out_buffer;
#else
if (this) {
if (ze_obj->xmlwriter_ptr) {
xmlwriter_free_resource_ptr(ze_obj->xmlwriter_ptr TSRMLS_CC);
}
ze_obj->xmlwriter_ptr = intern;
RETURN_TRUE;
} else
@ -1894,6 +1897,9 @@ static PHP_FUNCTION(xmlwriter_open_memory)
intern->uri_output = NULL;
#else
if (this) {
if (ze_obj->xmlwriter_ptr) {
xmlwriter_free_resource_ptr(ze_obj->xmlwriter_ptr TSRMLS_CC);
}
ze_obj->xmlwriter_ptr = intern;
RETURN_TRUE;
} else

Loading…
Cancel
Save