Module: kamailio
Branch: master
Commit: 70563ca0629a8de5aa5427b003f441e6c3a40c6a
URL:
https://github.com/kamailio/kamailio/commit/70563ca0629a8de5aa5427b003f441e…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-07-18T13:41:16+02:00
dialplan: remove pcre2_free() warning
related to #3851
---
Modified: src/modules/dialplan/dp_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/70563ca0629a8de5aa5427b003f441e…
Patch:
https://github.com/kamailio/kamailio/commit/70563ca0629a8de5aa5427b003f441e…
---
diff --git a/src/modules/dialplan/dp_db.c b/src/modules/dialplan/dp_db.c
index 857a2e43e75..64d2a4f3b12 100644
--- a/src/modules/dialplan/dp_db.c
+++ b/src/modules/dialplan/dp_db.c
@@ -203,8 +203,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;
+ }
}
int init_data(void)