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