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
mr26.1
Donat Zenichev 2 weeks ago
parent 0449d0d1e6
commit 3820f204de

@ -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);

Loading…
Cancel
Save