Module: kamailio
Branch: 5.8
Commit: 685f45c4adf911ac41c14b55ad36dd4b8b51897c
URL:
https://github.com/kamailio/kamailio/commit/685f45c4adf911ac41c14b55ad36dd4…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-07-18T13:42:31+02:00
dialplan: remove pcre2_free() warning
related to #3851
(cherry picked from commit 70563ca0629a8de5aa5427b003f441e6c3a40c6a)
---
Modified: src/modules/dialplan/dp_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/685f45c4adf911ac41c14b55ad36dd4…
Patch:
https://github.com/kamailio/kamailio/commit/685f45c4adf911ac41c14b55ad36dd4…
---
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)