manager: fix double free of criteria variable when adding filter

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

Fixes: #1531
pull/1714/head
Michal Hajek 12 months ago
parent a6539cb9af
commit e1d49be69d

@ -5709,7 +5709,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");

Loading…
Cancel
Save