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

Valgrind fixes:

- fixed 2 unitialized memory errors
- fixed leak in client test
This commit is contained in:
Georg Richter
2016-08-21 20:35:13 +02:00
parent b07a173d00
commit fbf6fd1598
4 changed files with 9 additions and 9 deletions

View File

@@ -3028,7 +3028,7 @@ static int test_bug8330(MYSQL *mysql)
int i, rc;
const char *query= "select a,b from t1 where a=?";
MYSQL_BIND my_bind[2];
long lval[2];
long lval[2]= {1,2};
stmt_text= "drop table if exists t1";
/* in case some previos test failed */
@@ -3354,6 +3354,7 @@ static int test_decimal_bug(MYSQL *mysql)
*/
memset(my_bind, '\0', sizeof(my_bind));
memset(data, 0, sizeof(data));
my_bind[0].buffer_type= MYSQL_TYPE_NEWDECIMAL;
my_bind[0].buffer= (void *)data;
my_bind[0].buffer_length= 25;