summaryrefslogtreecommitdiff
path: root/libcli/ldap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2020-08-05 11:23:30 +0200
committerJeremy Allison <jra@samba.org>2020-08-06 19:00:36 +0000
commitde2a7574e8a0ed1fd41f707788f3e04647022dff (patch)
tree9bf70e507aca1404b94110a46eea8d8b623fddc4 /libcli/ldap
parent41beb510bee3c7f1ebaba49ee1ceba07f6de78ba (diff)
downloadsamba-de2a7574e8a0ed1fd41f707788f3e04647022dff.tar.gz
libcli/ldap: Fix CID 1462696 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'libcli/ldap')
-rw-r--r--libcli/ldap/tests/ldap_message_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcli/ldap/tests/ldap_message_test.c b/libcli/ldap/tests/ldap_message_test.c
index 4ffdb3bb477..5ac7f2ef9a9 100644
--- a/libcli/ldap/tests/ldap_message_test.c
+++ b/libcli/ldap/tests/ldap_message_test.c
@@ -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);
}
/*