Module: kamailio
Branch: 5.8
Commit: 64a01ebec255ece59be3683bab421b35505d745d
URL:
https://github.com/kamailio/kamailio/commit/64a01ebec255ece59be3683bab421b3…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
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/64a01ebec255ece59be3683bab421b3…
Patch:
https://github.com/kamailio/kamailio/commit/64a01ebec255ece59be3683bab421b3…
---
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;
+ }
}
/*