[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Aug 8 11:34:03 UTC 2019


The branch, master has been updated
       via  3bf915846f7 tfork: Free memory in torture test to satisfy sanitizer
       via  f9a32767b69 ldb: Free memory in torture test to satisfy sanitizer
       via  84e519f3655 util: Free memory in charset torture test to satisfy sanitizer
       via  bb8cc5956f7 ndr: Free memory in torture test to satisfy sanitizer
       via  235288acaed util: Free memory in genrand torture test to satisfy sanitizer
       via  d167fb40899 ldb: Fix mem allocation in torture test to satisfy sanitizer
      from  a16477e6e62 registry: Free memory at the end of each loop run to prevent mem leak

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


- Log -----------------------------------------------------------------
commit 3bf915846f77d7df451728d115eaa25613532063
Author: Swen Schillig <swen at linux.ibm.com>
Date:   Mon Jul 29 15:46:15 2019 +0200

    tfork: Free memory in torture test to satisfy sanitizer
    
    Signed-off-by: Swen Schillig <swen at linux.ibm.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Thu Aug  8 11:33:32 UTC 2019 on sn-devel-184

commit f9a32767b690532ed897730e8179dcc84473d148
Author: Swen Schillig <swen at linux.ibm.com>
Date:   Mon Jul 29 14:55:10 2019 +0200

    ldb: Free memory in torture test to satisfy sanitizer
    
    Signed-off-by: Swen Schillig <swen at linux.ibm.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>

commit 84e519f36559f783af7e1143175ae6b316bd1e75
Author: Swen Schillig <swen at linux.ibm.com>
Date:   Mon Jul 29 10:47:20 2019 +0200

    util: Free memory in charset torture test to satisfy sanitizer
    
    Signed-off-by: Swen Schillig <swen at linux.ibm.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>

commit bb8cc5956f7bac9afedcba2744d691b2d8485b62
Author: Swen Schillig <swen at linux.ibm.com>
Date:   Mon Jul 29 10:23:14 2019 +0200

    ndr: Free memory in torture test to satisfy sanitizer
    
    Signed-off-by: Swen Schillig <swen at linux.ibm.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>

commit 235288acaedf39ea386121347343d56df3d1d858
Author: Swen Schillig <swen at linux.ibm.com>
Date:   Mon Jul 29 10:00:26 2019 +0200

    util: Free memory in genrand torture test to satisfy sanitizer
    
    Signed-off-by: Swen Schillig <swen at linux.ibm.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>

commit d167fb40899c8b2f9919455f40e95e00adc8e1e9
Author: Swen Schillig <swen at linux.ibm.com>
Date:   Mon Jul 29 09:50:24 2019 +0200

    ldb: Fix mem allocation in torture test to satisfy sanitizer
    
    Signed-off-by: Swen Schillig <swen at linux.ibm.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>

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

Summary of changes:
 lib/util/charset/tests/convert_string.c | 10 ++++++++++
 lib/util/tests/genrand.c                |  2 ++
 lib/util/tests/tfork.c                  |  3 +++
 source4/torture/ldb/ldb.c               |  5 ++++-
 source4/torture/ndr/cabinet.c           |  6 ++++++
 source4/torture/ndr/clusapi.c           |  7 +++++++
 6 files changed, 32 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/tests/convert_string.c b/lib/util/charset/tests/convert_string.c
index 42b0c32f792..e99a2965a05 100644
--- a/lib/util/charset/tests/convert_string.c
+++ b/lib/util/charset/tests/convert_string.c
@@ -1525,6 +1525,11 @@ static bool test_gd_case_utf8_handle(struct torture_context *tctx)
 	torture_assert(tctx, strncasecmp_m_handle(iconv_handle, gd_upper,
 						 gd_lower, gd_utf8.length) == 0,
 		       "case insensitive comparison upper/lower");
+
+	data_blob_free(&gd_utf8);
+	data_blob_free(&gd_utf8_upper);
+	data_blob_free(&gd_utf8_lower);
+
 	return true;
 }
 
@@ -1589,6 +1594,11 @@ static bool test_gd_case_cp850_handle(struct torture_context *tctx)
 	torture_assert(tctx, strncasecmp_m_handle(iconv_handle, gd_upper,
 						 gd_lower, gd_cp850.length) == 0,
 		       "case insensitive comparison upper/lower");
+
+	data_blob_free(&gd_cp850);
+	data_blob_free(&gd_cp850_upper);
+	data_blob_free(&gd_cp850_lower);
+
 	return true;
 }
 
diff --git a/lib/util/tests/genrand.c b/lib/util/tests/genrand.c
index 81c20bc386f..3987c33f25f 100644
--- a/lib/util/tests/genrand.c
+++ b/lib/util/tests/genrand.c
@@ -47,6 +47,8 @@ static bool test_generate_random_str(struct torture_context *tctx)
 	torture_assert_int_equal(tctx, strlen(r), 10, "right length generated");
 	r = generate_random_str(mem_ctx, 5);
 	torture_assert_int_equal(tctx, strlen(r), 5, "right length generated");
+
+	TALLOC_FREE(mem_ctx);
 	return true;
 }
 
diff --git a/lib/util/tests/tfork.c b/lib/util/tests/tfork.c
index 8a6197fc00f..22684e6ea9a 100644
--- a/lib/util/tests/tfork.c
+++ b/lib/util/tests/tfork.c
@@ -656,6 +656,9 @@ static bool test_tfork_event_file_handle(struct torture_context *tctx)
 			    "tfork process 2 event fd not readable\n");
 
 done:
+	free(t1);
+	free(t2);
+
 	return ok;
 }
 
diff --git a/source4/torture/ldb/ldb.c b/source4/torture/ldb/ldb.c
index 1de24cbc7ed..ad544beabe6 100644
--- a/source4/torture/ldb/ldb.c
+++ b/source4/torture/ldb/ldb.c
@@ -1452,6 +1452,7 @@ static bool torture_ldb_pack_data_v2(struct torture_context *torture)
 				 binary.length,
 				 "packed data not as expected");
 	talloc_free(expect_bin);
+	TALLOC_FREE(msg.dn);
 
 	return true;
 }
@@ -1505,6 +1506,8 @@ static bool torture_ldb_pack_data_v2_special(struct torture_context *torture)
 				 binary.length,
 				 "packed data not as expected");
 
+	TALLOC_FREE(msg.dn);
+
 	return true;
 }
 
@@ -1744,7 +1747,7 @@ static bool torture_ldb_unpack_and_filter(struct torture_context *torture,
 struct torture_suite *torture_ldb(TALLOC_CTX *mem_ctx)
 {
 	int i;
-	struct ldb_val *bins = talloc_array(NULL, struct ldb_val, 2);
+	struct ldb_val *bins = talloc_array(mem_ctx, struct ldb_val, 2);
 	struct torture_suite *suite = torture_suite_create(mem_ctx, "ldb");
 
 	if (suite == NULL) {
diff --git a/source4/torture/ndr/cabinet.c b/source4/torture/ndr/cabinet.c
index 8cdf4cb4930..5b931083906 100644
--- a/source4/torture/ndr/cabinet.c
+++ b/source4/torture/ndr/cabinet.c
@@ -4173,6 +4173,8 @@ static bool cab_file_plain_check(struct torture_context *tctx,
 
 	torture_assert_data_blob_equal(tctx, r->cfdata[0].ab, blob, "ab");
 
+	data_blob_free(&blob);
+
 	return true;
 }
 
@@ -4236,6 +4238,8 @@ static bool cab_file_MSZIP_check(struct torture_context *tctx,
 
 	torture_assert_data_blob_equal(tctx, r->cfdata[0].ab, blob, "ab");
 
+	data_blob_free(&blob);
+
 	return true;
 }
 
@@ -4305,6 +4309,8 @@ static bool cab_file_LZX_check(struct torture_context *tctx,
 	/* once we have LZX compression support we can enable this test */
 	torture_assert_data_blob_equal(tctx, r->cfdata[0].ab, blob, "ab");
 #endif
+	data_blob_free(&blob);
+
 	return true;
 }
 
diff --git a/source4/torture/ndr/clusapi.c b/source4/torture/ndr/clusapi.c
index cf2ac67873e..db6a27c63ca 100644
--- a/source4/torture/ndr/clusapi.c
+++ b/source4/torture/ndr/clusapi.c
@@ -141,6 +141,9 @@ static bool clusapi_PROPERTY_LIST_check(struct torture_context *tctx,
 	torture_assert_int_equal(tctx, r->propertyValues[5].PropertyValues.Padding.length, 0, "PropertyValues.Padding.length");
 	torture_assert_int_equal(tctx, r->propertyValues[5].end_mark, CLUSPROP_SYNTAX_ENDMARK, "end_mark");
 
+	data_blob_free(&blob_dword_null);
+	data_blob_free(&blob_dword_one);
+
 	return true;
 }
 
@@ -362,6 +365,10 @@ static bool clusapi_PROPERTY_LIST_check2(struct torture_context *tctx,
 	torture_assert_int_equal(tctx, r->propertyValues[11].PropertyValues.Padding.length, 0, "PropertyValues.Padding.length");
 	torture_assert_int_equal(tctx, r->propertyValues[11].end_mark, CLUSPROP_SYNTAX_ENDMARK, "end_mark");
 
+	data_blob_free(&blob_dword_null);
+	data_blob_free(&blob_dword_one);
+	data_blob_free(&blob_dword);
+
 	return true;
 }
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list