diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-22 10:17:05 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-22 10:17:05 +0200 |
commit | 2c16fd9bafa1945463dadc9c7bc8f7d455791d5a (patch) | |
tree | b34becfe0cf0e9ef69b252187cb26e238cf33c7f /tests | |
parent | 2b6f235ae0ee779c65b99326c33c1c780d24383d (diff) | |
download | mariadb-git-2c16fd9bafa1945463dadc9c7bc8f7d455791d5a.tar.gz |
MDEV-24827, MDEV-20516 fixup: Use C90, plug memory leaks
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index db5c9a8688a..65eb502420d 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -1,5 +1,5 @@ /* Copyright (c) 2002, 2014, Oracle and/or its affiliates. - Copyright (c) 2008, 2020, MariaDB + Copyright (c) 2008, 2022, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20005,6 +20005,7 @@ static void test_mdev24827() rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); + mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP TABLE t1"); myquery(rc); @@ -20018,6 +20019,8 @@ static void test_mdev_20516() MYSQL_STMT *stmt; int rc; unsigned long cursor= CURSOR_TYPE_READ_ONLY; + const char* query= + "CREATE VIEW v1 AS SELECT * FROM t1"; myheader("test_mdev_20516"); @@ -20027,9 +20030,6 @@ static void test_mdev_20516() rc= mysql_query(mysql, "CREATE TABLE t1(a INT)"); myquery(rc); - const char* query= - "CREATE VIEW v1 AS SELECT * FROM t1"; - stmt= mysql_stmt_init(mysql); check_stmt(stmt); @@ -20041,6 +20041,7 @@ static void test_mdev_20516() rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); + mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP TABLE t1"); myquery(rc); |