]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Free condition results early
authorNick Porter <nick@portercomputing.co.uk>
Thu, 27 Feb 2025 12:14:52 +0000 (12:14 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 27 Feb 2025 13:51:25 +0000 (13:51 +0000)
src/lib/ldap/map.c

index 7e32dd9391c47726cf0594b464114fd8b64e2cd5..80b65a29e5cf1989e506ed41d86453b8e73f35f8 100644 (file)
@@ -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);
        }