]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.3' into PHP-5.4
authorXinchen Hui <laruence@php.net>
Wed, 4 Apr 2012 09:36:18 +0000 (17:36 +0800)
committerXinchen Hui <laruence@php.net>
Wed, 4 Apr 2012 09:36:18 +0000 (17:36 +0800)
* PHP-5.3:
  Fixed bug #61617 (Libxml tests failed(ht is already destroyed))
  Cherry-pick 4cc74767

Conflicts:
NEWS

1  2 
ext/libxml/libxml.c

index 9d6c25737d0f4b82ba49209d756e8941b850a38a,a17847868a523cf103e22a6b3c58f7d239690c4b..e42d845f902ef7e938ee5ce4e9e7fb5ec653a611
@@@ -865,16 -659,15 +865,17 @@@ static int php_libxml_post_deactivate(
  {
        TSRMLS_FETCH();
        /* reset libxml generic error handling */
 -      xmlSetGenericErrorFunc(NULL, NULL);
 -      xmlSetStructuredErrorFunc(NULL, NULL);
 +      if (_php_libxml_per_request_initialization) {
 +              xmlSetGenericErrorFunc(NULL, NULL);
 +              xmlSetStructuredErrorFunc(NULL, NULL);
  
 -      xmlParserInputBufferCreateFilenameDefault(NULL);
 -      xmlOutputBufferCreateFilenameDefault(NULL);
 +              xmlParserInputBufferCreateFilenameDefault(NULL);
 +              xmlOutputBufferCreateFilenameDefault(NULL);
 +      }
  
        if (LIBXML(stream_context)) {
-               zval_ptr_dtor(&LIBXML(stream_context));
+               /* the steam_context resource will be released by resource list destructor */
+               efree(LIBXML(stream_context));
                LIBXML(stream_context) = NULL;
        }
        smart_str_free(&LIBXML(error_buffer));