1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Added the FAIL_UNLESS call for the bind variable that is being allocated

to handle the possibility of the calloc failing and ensure we are not
working with NULL in the rest of the tests
This commit is contained in:
Pavol Sloboda
2025-05-26 12:15:01 +02:00
committed by Georg Richter
parent 0fc940259a
commit 06e041cfa2

View File

@@ -5164,6 +5164,7 @@ static int test_maxparam(MYSQL *mysql)
MYSQL_BIND* bind;
bind = calloc(65535, sizeof *bind);
FAIL_UNLESS(bind, "Not enough memory");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
check_mysql_rc(rc, mysql);