File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
- /* Copyright (c) 2003, 2016 , Oracle and/or its affiliates. All rights reserved.
1
+ /* Copyright (c) 2003, 2017 , Oracle and/or its affiliates. All rights reserved.
2
2
3
3
This program is free software; you can redistribute it and/or modify
4
4
it under the terms of the GNU General Public License as published by
@@ -3790,12 +3790,15 @@ static void mysql_close_free(MYSQL *mysql)
3790
3790
*/
3791
3791
static void mysql_prune_stmt_list (MYSQL * mysql )
3792
3792
{
3793
- LIST * element = mysql -> stmts ;
3794
3793
LIST * pruned_list = 0 ;
3795
3794
3796
- for (; element ; element = element -> next )
3795
+ while ( mysql -> stmts )
3797
3796
{
3798
- MYSQL_STMT * stmt = (MYSQL_STMT * ) element -> data ;
3797
+ LIST * element = mysql -> stmts ;
3798
+ MYSQL_STMT * stmt ;
3799
+
3800
+ mysql -> stmts = list_delete (element , element );
3801
+ stmt = (MYSQL_STMT * ) element -> data ;
3799
3802
if (stmt -> state != MYSQL_STMT_INIT_DONE )
3800
3803
{
3801
3804
stmt -> mysql = 0 ;
You can’t perform that action at this time.
0 commit comments