From 3820f204de25d770383dcc43caace33ace80410e Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Wed, 3 Jun 2026 18:23:57 +0200 Subject: [PATCH] MT#61856 call_interfaces: free `info_re` In case the allocation of pcre for streams regex fails, but not for the info, we never free the latter one, because on returning an error, just calling `die()`, hence no de-allocation procedures are fulfilled. Change-Id: I4a39b2c3043798c59fa6ec2fe0d70b1b1b27517f --- daemon/call_interfaces.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index b81564ec0..2e221051d 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -2725,8 +2725,11 @@ int call_interfaces_init(charp_ht templates) { streams_re = pcre2_compile((PCRE2_SPTR8) "^([\\d.]+):(\\d+)(?::(.*?))?(?:$|,)", PCRE2_ZERO_TERMINATED, PCRE2_DOLLAR_ENDONLY | PCRE2_DOTALL, &errcode, &erroff, NULL); - if (!streams_re) + if (!streams_re) { + pcre2_code_free(info_re); + info_re = NULL; return -1; + } rtpe_signalling_templates = str_case_value_ht_new(); parse_templates(templates);