Module: kamailio Branch: master Commit: 310b631007082f553117d126b6b9bd915be596ac URL: https://github.com/kamailio/kamailio/commit/310b631007082f553117d126b6b9bd915be596ac
Author: Victor Seva <[email protected]> Committer: Victor Seva <[email protected]> Date: 2024-07-18T13:41:15+02:00 lcr: remove pcre2_free() warning related to #3851 --- Modified: src/modules/lcr/lcr_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/310b631007082f553117d126b6b9bd915be596ac.diff Patch: https://github.com/kamailio/kamailio/commit/310b631007082f553117d126b6b9bd915be596ac.patch --- diff --git a/src/modules/lcr/lcr_mod.c b/src/modules/lcr/lcr_mod.c index 6cad2830fb6..f53de3b3668 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]
