1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

libcli/ldap: Fix CID 1462695 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2020-08-05 11:25:27 +02:00 committed by Jeremy Allison
parent de2a7574e8
commit 1b139de552

View File

@ -197,6 +197,7 @@ static void test_recursion_depth_equals_max(void **state)
uint8_t *buffer = NULL;
const size_t BUFF_SIZE = 1048576;
size_t len;
int ret;
struct ldap_request_limits limits = {
.max_search_size = 256000,
};
@ -219,6 +220,10 @@ static void test_recursion_depth_equals_max(void **state)
status = ldap_decode(
asn1, &limits, samba_ldap_control_handlers(), ldap_msg);
assert_true(NT_STATUS_IS_OK(status));
ret = fclose(f);
f = NULL;
assert_true(ret == 0);
}
/*