manager: fix memory leak in manager_add_filter function
[asterisk/asterisk.git] / main / manager.c
index fe4e7c3..3c98185 100644 (file)
@@ -5150,6 +5150,8 @@ static enum add_filter_result manager_add_filter(const char *filter_pattern, str
                ao2_t_link(whitefilters, new_filter, "link new filter into white user container");
        }
 
+       ao2_ref(new_filter, -1);
+
        return FILTER_SUCCESS;
 }