summaryrefslogtreecommitdiff
path: root/src/sp_pcre_compat.c
diff options
context:
space:
mode:
authorjvoisin2021-05-08 17:14:46 +0200
committerjvoisin2021-05-08 17:14:46 +0200
commit194b0bc9f0a4699854ea314ffa23e59f8082ddae (patch)
treee4ff10b44a831bac57ebad21abef1258a5423020 /src/sp_pcre_compat.c
parentad623f1d78151dfe2eaee85e93ed1058be1c7f91 (diff)
Remove some memory-leaks
Diffstat (limited to 'src/sp_pcre_compat.c')
-rw-r--r--src/sp_pcre_compat.c5
1 files changed, 5 insertions, 0 deletions
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 @@
1#include "php_snuffleupagus.h" 1#include "php_snuffleupagus.h"
2 2
3inline void sp_pcre_free(sp_pcre* regexp) {
4 pcre2_code_free(regexp);
5 regexp = NULL;
6}
7
3sp_pcre* sp_pcre_compile(const char* const pattern) { 8sp_pcre* sp_pcre_compile(const char* const pattern) {
4 assert(NULL != pattern); 9 assert(NULL != pattern);
5 10