From: Nick Porter Date: Thu, 27 Feb 2025 12:14:52 +0000 (+0000) Subject: Free condition results early X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d31efb88ff063800cc94184869e34b04a1abfea8;p=thirdparty%2Ffreeradius-server.git Free condition results early --- diff --git a/src/lib/ldap/map.c b/src/lib/ldap/map.c index 7e32dd9391..80b65a29e5 100644 --- a/src/lib/ldap/map.c +++ b/src/lib/ldap/map.c @@ -388,10 +388,12 @@ int fr_ldap_map_do(request_t *request, char const *check_attr, } if (!fr_value_box_list_head(&res) || !fr_value_box_is_truthy(fr_value_box_list_head(&res))) { RDEBUG2("Failed match: skipping this profile"); + fr_value_box_list_talloc_free(&res); goto free; } talloc_free(value); talloc_free(cond_expr); + fr_value_box_list_talloc_free(&res); } ldap_value_free_len(values); }