pajoye Fri, 09 Oct 2009 18:52:59 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289439
Log:
- Merge: fix mem leak
Changed paths:
U php/php-src/branches/PHP_5_3_1/ext/dom/documenttype.c
Modified: php/php-src/branches/PHP_5_3_1/ext/dom/documenttype.c
===================================================================
--- php/php-src/branches/PHP_5_3_1/ext/dom/documenttype.c 2009-10-09
17:50:17 UTC (rev 289438)
+++ php/php-src/branches/PHP_5_3_1/ext/dom/documenttype.c 2009-10-09
18:52:59 UTC (rev 289439)
@@ -190,7 +190,6 @@
xmlDtdPtr dtdptr;
xmlDtd *intsubset;
xmlOutputBuffer *buff = NULL;
- xmlChar *strintsubset;
dtdptr = (xmlDtdPtr) dom_object_get_node(obj);
@@ -206,9 +205,8 @@
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset,
0, 0, NULL);
xmlOutputBufferFlush(buff);
- strintsubset = xmlStrndup(buff->buffer->content,
buff->buffer->use);
+ ZVAL_STRINGL(*retval, buff->buffer->content,
buff->buffer->use, 1);
(void)xmlOutputBufferClose(buff);
- ZVAL_STRING(*retval, (char *) strintsubset, 1);
return SUCCESS;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php