]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
manager: fix double free of criteria variable when adding filter
authorMichal Hajek <michal.hajek@daktela.com>
Mon, 13 Oct 2025 12:02:43 +0000 (14:02 +0200)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 4 Dec 2025 13:05:50 +0000 (13:05 +0000)
Signed-off-by: Michal Hajek <michal.hajek@daktela.com>
Fixes: #1531
main/manager.c

index d4fea174ddf47ba9fc8ebb067a04f948b8e2db45..f6e86e8fc40ae24235782d8a9ec29b2f2044c8ed 100644 (file)
@@ -5705,7 +5705,7 @@ static int action_filter(struct mansession *s, const struct message *m)
                }
 
                res = manager_add_filter(criteria, filter, s->session->includefilters, s->session->excludefilters);
-               ast_std_free(criteria);
+               ast_free(criteria);
                if (res != FILTER_SUCCESS) {
                        if (res == FILTER_ALLOC_FAILED) {
                                astman_send_error(s, m, "Internal Error. Failed to allocate regex for filter");