Skip to content

Commit 41b8cdd

Browse files
committed
Don't leak pcre error_code across requests
1 parent 5eb6f59 commit 41b8cdd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/pcre/php_pcre.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ static PHP_RINIT_FUNCTION(pcre)
486486
mdata_used = 0;
487487
#endif
488488

489+
PCRE_G(error_code) = PHP_PCRE_NO_ERROR;
489490
PCRE_G(gctx_zmm) = pcre2_general_context_create(php_pcre_emalloc, php_pcre_efree, NULL);
490491
if (!PCRE_G(gctx_zmm)) {
491492
return FAILURE;

0 commit comments

Comments
 (0)