From 57dd892ce8dc93bcd7eee953e01ebe8ed7e414c8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 5 Mar 2019 00:32:04 +0100 Subject: fix memory leaks in mysql_client_test This fixes main.mysql_client_test, main.mysql_client_test_comp, main.mysql_client_test_nonblock failures in ASAN_OPTIONS="abort_on_error=1" runs --- tests/mysql_client_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index d12ca2ab96a..9c64342954a 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -18426,6 +18426,7 @@ static void test_bug42373() DIE_UNLESS(rc == 1); mysql_stmt_close(stmt); + mysql_close(&con); /* Now try with a multi-statement. */ DIE_UNLESS(mysql_client_init(&con)); @@ -18888,8 +18889,6 @@ static void test_progress_reporting() conn= client_connect(CLIENT_PROGRESS_OBSOLETE, MYSQL_PROTOCOL_TCP, 0); - if (!(conn->server_capabilities & CLIENT_PROGRESS_OBSOLETE)) - return; DIE_UNLESS(conn->client_flag & CLIENT_PROGRESS_OBSOLETE); mysql_options(conn, MYSQL_PROGRESS_CALLBACK, (void*) report_progress); @@ -19739,6 +19738,7 @@ static void test_bulk_delete() DIE_IF(atoi(row[0]) != 3); } DIE_IF(i != 1); + mysql_free_result(result); rc= mysql_query(mysql, "DROP TABLE t1"); myquery(rc); -- cgit v1.2.1