Module: kamailio Branch: 5.8 Commit: 64a01ebec255ece59be3683bab421b35505d745d URL: https://github.com/kamailio/kamailio/commit/64a01ebec255ece59be3683bab421b35505d745d
Author: Victor Seva <[email protected]> Committer: Victor Seva <[email protected]> Date: 2024-07-18T13:42:31+02:00 lcr: remove pcre2_free() warning related to #3851 (cherry picked from commit 310b631007082f553117d126b6b9bd915be596ac) --- Modified: src/modules/lcr/lcr_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/64a01ebec255ece59be3683bab421b35505d745d.diff Patch: https://github.com/kamailio/kamailio/commit/64a01ebec255ece59be3683bab421b35505d745d.patch --- diff --git a/src/modules/lcr/lcr_mod.c b/src/modules/lcr/lcr_mod.c index dac215a9eb5..bbd397d5186 100644 --- a/src/modules/lcr/lcr_mod.c +++ b/src/modules/lcr/lcr_mod.c @@ -433,8 +433,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; + } } /* _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to [email protected]
