Module: kamailio Branch: 5.8 Commit: 1946e35c4d144fba3067d3fee5d1bd030dc4a609 URL: https://github.com/kamailio/kamailio/commit/1946e35c4d144fba3067d3fee5d1bd030dc4a609
Author: Victor Seva <linuxman...@torreviejawireless.org> Committer: Victor Seva <linuxman...@torreviejawireless.org> Date: 2024-07-18T13:42:31+02:00 regex: remove pcre2_free() warning related to #3851 (cherry picked from commit b86030cfbd66ba95f33f312595edae29e2b5cde0) --- Modified: src/modules/regex/regex_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/1946e35c4d144fba3067d3fee5d1bd030dc4a609.diff Patch: https://github.com/kamailio/kamailio/commit/1946e35c4d144fba3067d3fee5d1bd030dc4a609.patch --- diff --git a/src/modules/regex/regex_mod.c b/src/modules/regex/regex_mod.c index 52ed60b295c..f4e93e48a3e 100644 --- a/src/modules/regex/regex_mod.c +++ b/src/modules/regex/regex_mod.c @@ -170,8 +170,10 @@ static void *pcre2_malloc(size_t size, void *ext) static void pcre2_free(void *ptr, void *ext) { - shm_free(ptr); - ptr = NULL; + if(ptr) { + shm_free(ptr); + ptr = NULL; + } } /*! \brief _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org