From 41b8cdd2e0ec4478166c577e6a4d6a9223094f71 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 22 Oct 2020 11:01:59 +0200 Subject: Don't leak pcre error_code across requests --- ext/pcre/php_pcre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index ee340829ee..4a796062ec 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -486,6 +486,7 @@ static PHP_RINIT_FUNCTION(pcre) mdata_used = 0; #endif + PCRE_G(error_code) = PHP_PCRE_NO_ERROR; PCRE_G(gctx_zmm) = pcre2_general_context_create(php_pcre_emalloc, php_pcre_efree, NULL); if (!PCRE_G(gctx_zmm)) { return FAILURE; -- cgit v1.2.1