]> granicus.if.org Git - php/commitdiff
fix segfault on shutdown due to UG(utf8_conv) being destroyed twice
authorAntony Dovgal <tony2001@php.net>
Fri, 24 Aug 2007 12:13:30 +0000 (12:13 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 24 Aug 2007 12:13:30 +0000 (12:13 +0000)
ext/pcre/php_pcre.c

index c0257a748b65fff5aaf6f09c5ef37dd9e0b1da83..44bb9c36af4f2e86530abd58114e6ce9579eeb3a 100644 (file)
@@ -1034,6 +1034,7 @@ static int preg_do_eval(char *eval_str, int eval_str_len, char *subject,
        /* Run the code */
        if (zend_eval_string(code.c, &retval, compiled_string_description TSRMLS_CC) == FAILURE) {
                efree(compiled_string_description);
+               UG(runtime_encoding_conv) = orig_runtime_conv;
                php_error_docref(NULL TSRMLS_CC,E_ERROR, "Failed evaluating code: %s%s", PHP_EOL, code.c);
                /* zend_error() does not return in this case */
        }