From: Swen Schillig Date: Mon, 29 Jul 2019 08:47:20 +0000 (+0200) Subject: util: Free memory in charset torture test to satisfy sanitizer X-Git-Tag: tdb-1.4.2~238 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84e519f36559f783af7e1143175ae6b316bd1e75;p=thirdparty%2Fsamba.git util: Free memory in charset torture test to satisfy sanitizer Signed-off-by: Swen Schillig Reviewed-by: Andrew Bartlett Reviewed-by: Matthias Dieter Wallnöfer --- 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; }