From 194b0bc9f0a4699854ea314ffa23e59f8082ddae Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 8 May 2021 17:14:46 +0200 Subject: Remove some memory-leaks --- src/sp_pcre_compat.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sp_pcre_compat.c') diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 09a2fc7..adcdee7 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -1,5 +1,10 @@ #include "php_snuffleupagus.h" +inline void sp_pcre_free(sp_pcre* regexp) { + pcre2_code_free(regexp); + regexp = NULL; +} + sp_pcre* sp_pcre_compile(const char* const pattern) { assert(NULL != pattern); -- cgit v1.3