Module: kamailio
Branch: master
Commit: 630a6f2c11c10c4f3be3570553d86486942d60fe
URL:
https://github.com/kamailio/kamailio/commit/630a6f2c11c10c4f3be3570553d8648…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-05-30T14:59:05+02:00
dialplan: don't call free on empty pcre pointer
fixes #3851
---
Modified: src/modules/dialplan/dp_repl.c
---
Diff:
https://github.com/kamailio/kamailio/commit/630a6f2c11c10c4f3be3570553d8648…
Patch:
https://github.com/kamailio/kamailio/commit/630a6f2c11c10c4f3be3570553d8648…
---
diff --git a/src/modules/dialplan/dp_repl.c b/src/modules/dialplan/dp_repl.c
index 42ba3b4abe6..51cab404710 100644
--- a/src/modules/dialplan/dp_repl.c
+++ b/src/modules/dialplan/dp_repl.c
@@ -648,7 +648,8 @@ int dp_translate_helper(
LM_DBG("match check skipped: [%.*s] %d\n",
re_list->expr.len, re_list->expr.s, rez);
rt = re_list->next;
- pcre2_match_data_free(pcre_md);
+ if(pcre_md)
+ pcre2_match_data_free(pcre_md);
pcre2_code_free(re_list->re);
pkg_free(re_list);
re_list = rt;