diff options
| author | jvoisin | 2021-05-08 17:14:46 +0200 |
|---|---|---|
| committer | jvoisin | 2021-05-08 17:14:46 +0200 |
| commit | 194b0bc9f0a4699854ea314ffa23e59f8082ddae (patch) | |
| tree | e4ff10b44a831bac57ebad21abef1258a5423020 /src/sp_pcre_compat.c | |
| parent | ad623f1d78151dfe2eaee85e93ed1058be1c7f91 (diff) | |
Remove some memory-leaks
Diffstat (limited to 'src/sp_pcre_compat.c')
| -rw-r--r-- | src/sp_pcre_compat.c | 5 |
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 | ||
| 3 | inline void sp_pcre_free(sp_pcre* regexp) { | ||
| 4 | pcre2_code_free(regexp); | ||
| 5 | regexp = NULL; | ||
| 6 | } | ||
| 7 | |||
| 3 | sp_pcre* sp_pcre_compile(const char* const pattern) { | 8 | sp_pcre* sp_pcre_compile(const char* const pattern) { |
| 4 | assert(NULL != pattern); | 9 | assert(NULL != pattern); |
| 5 | 10 | ||
