|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-11-21 20:05 UTC] mfischer@php.net
[2001-12-13 06:25 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 02:00:01 2025 UTC |
The memory allocated by xmlDumpMemory must be deallocated (free()'d). The Zend/zend_API.h macro RETURN_STRINGL() doesn't do this. A substitute (below) seems to do the trick. #define FREE_RETURN_STRINGL(s,l,duplicate) { \ char *__s=(s); int __l=l; \ return_value->value.str.len = __l; \ return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \ return_value->type = IS_STRING; \ free(s); \ return; \ } I used this at the bottom of domxml_dumpmem() and can now do bunches of dom functions without crashing Apache or the CGI.