manager: fix double free of criteria variable when adding filter

Signed-off-by: Michal Hajek <michal.hajek@daktela.com>

Fixes: #1531
This commit is contained in:
Michal Hajek
2025-10-13 14:02:43 +02:00
committed by Asterisk Development Team
parent b1c81bc0c9
commit 64c67ae8a0
+1 -1
View 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");