1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libcli/ldap: Fix CID 1462696 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:23:30 +02:00 committed by Jeremy Allison
parent 41beb510be
commit de2a7574e8

View File

@ -237,6 +237,7 @@ static void test_recursion_depth_greater_than_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,
};
@ -259,6 +260,10 @@ static void test_recursion_depth_greater_than_max(void **state)
status = ldap_decode(
asn1, &limits, samba_ldap_control_handlers(), ldap_msg);
assert_ldap_status_equal(LDAP_PROTOCOL_ERROR, status);
ret = fclose(f);
f = NULL;
assert_true(ret == 0);
}
/*