Skip to content

Commit 57dd892

Browse files
committed
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
1 parent 2f742b5 commit 57dd892

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/mysql_client_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18426,6 +18426,7 @@ static void test_bug42373()
1842618426
DIE_UNLESS(rc == 1);
1842718427

1842818428
mysql_stmt_close(stmt);
18429+
mysql_close(&con);
1842918430

1843018431
/* Now try with a multi-statement. */
1843118432
DIE_UNLESS(mysql_client_init(&con));
@@ -18888,8 +18889,6 @@ static void test_progress_reporting()
1888818889

1888918890

1889018891
conn= client_connect(CLIENT_PROGRESS_OBSOLETE, MYSQL_PROTOCOL_TCP, 0);
18891-
if (!(conn->server_capabilities & CLIENT_PROGRESS_OBSOLETE))
18892-
return;
1889318892
DIE_UNLESS(conn->client_flag & CLIENT_PROGRESS_OBSOLETE);
1889418893

1889518894
mysql_options(conn, MYSQL_PROGRESS_CALLBACK, (void*) report_progress);
@@ -19739,6 +19738,7 @@ static void test_bulk_delete()
1973919738
DIE_IF(atoi(row[0]) != 3);
1974019739
}
1974119740
DIE_IF(i != 1);
19741+
mysql_free_result(result);
1974219742

1974319743
rc= mysql_query(mysql, "DROP TABLE t1");
1974419744
myquery(rc);

0 commit comments

Comments
 (0)