]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_dialplan_xml] Fix double free after upgrade to pcre2. (#2946)
authorAndrey Volk <andywolk@gmail.com>
Thu, 13 Nov 2025 14:42:04 +0000 (17:42 +0300)
committerGitHub <noreply@github.com>
Thu, 13 Nov 2025 14:42:04 +0000 (17:42 +0300)
src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c

index 3d3fdfd8a93ccf9380d3991287fdef54cf3c9966..cab522887c4e4519098f94b808dfdb6443e8b2e9 100644 (file)
@@ -348,7 +348,7 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
 
                                        switch_safe_free(save_expression);
                                        switch_safe_free(save_field_data);
-                                       switch_regex_match_safe_free(match_data);
+                                       switch_regex_match_safe_free(save_match_data);
                                        switch_regex_safe_free(save_re);
 
                                        save_expression = strdup(expression);
@@ -358,6 +358,7 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
                                        save_proceed = proceed;
 
                                        re = NULL;
+                                       match_data = NULL;
                                }
 
                                switch_regex_match_safe_free(match_data);