[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Aug 6 20:24:02 UTC 2020


The branch, master has been updated
       via  04b2db7d885 libsmb: Fix CID 1465656 Resource leak
       via  1b139de552e libcli/ldap: Fix CID 1462695 Resource leak
       via  de2a7574e8a libcli/ldap: Fix CID 1462696 Resource leak
       via  41beb510bee libcli/ldap: Fix CID 1465278 Resource leak
      from  d512b1a4bd1 gpo: Remove unused gp_ext_setter code

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 04b2db7d885a233276f271116040ee58669dd69e
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Aug 5 16:22:10 2020 +0200

    libsmb: Fix CID 1465656 Resource leak
    
    This is very likely a false positive, because Coverity does not see
    that we only assign "dns_addrs" when NT_STATUS_IS_OK(status), so we
    might not want this. But it is a fresh finding and looks cleaner this
    way.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Aug  6 20:23:53 UTC 2020 on sn-devel-184

commit 1b139de552e162ce6a7673b74b7778dfc5a06b51
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Aug 5 11:25:27 2020 +0200

    libcli/ldap: Fix CID 1462695 Resource leak
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit de2a7574e8a0ed1fd41f707788f3e04647022dff
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Aug 5 11:23:30 2020 +0200

    libcli/ldap: Fix CID 1462696 Resource leak
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 41beb510bee3c7f1ebaba49ee1ceba07f6de78ba
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Aug 5 11:18:35 2020 +0200

    libcli/ldap: Fix CID 1465278 Resource leak
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 libcli/ldap/tests/ldap_message_test.c | 15 +++++++++++++++
 source3/libsmb/namequery.c            |  1 +
 2 files changed, 16 insertions(+)


Changeset truncated at 500 lines:

diff --git a/libcli/ldap/tests/ldap_message_test.c b/libcli/ldap/tests/ldap_message_test.c
index 53636828f93..4050b7f1cb1 100644
--- a/libcli/ldap/tests/ldap_message_test.c
+++ b/libcli/ldap/tests/ldap_message_test.c
@@ -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);
 }
 
 /*
@@ -237,6 +242,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 +265,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);
 }
 
 /*
@@ -276,6 +286,7 @@ static void test_decode_exop_response(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,
 	};
@@ -298,6 +309,10 @@ static void test_decode_exop_response(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);
 }
 
 int main(_UNUSED_ int argc, _UNUSED_ const char **argv)
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 0e87df29690..734d921372c 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -2649,6 +2649,7 @@ static NTSTATUS resolve_ads(TALLOC_CTX *ctx,
 		TALLOC_FREE(dcs);
 		TALLOC_FREE(srv_addrs);
 		TALLOC_FREE(dns_lookup_names);
+		TALLOC_FREE(dns_addrs);
 		return status;
 	}
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list