You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fix crash (introduced by CLIENT_REMEMBER_OPTIONS leak fix)
see also http://lists.askmonty.org/pipermail/commits/2016-August/009643.html
This commit is contained in:
@@ -353,7 +353,7 @@ MK_ASYNC_START_BODY(
|
|||||||
parms.db= db;
|
parms.db= db;
|
||||||
parms.port= port;
|
parms.port= port;
|
||||||
parms.unix_socket= unix_socket;
|
parms.unix_socket= unix_socket;
|
||||||
parms.client_flags= client_flags;
|
parms.client_flags= client_flags | CLIENT_REMEMBER_OPTIONS;
|
||||||
},
|
},
|
||||||
NULL,
|
NULL,
|
||||||
r_ptr,
|
r_ptr,
|
||||||
|
@@ -1480,7 +1480,8 @@ error:
|
|||||||
end_server(mysql);
|
end_server(mysql);
|
||||||
/* only free the allocated memory, user needs to call mysql_close */
|
/* only free the allocated memory, user needs to call mysql_close */
|
||||||
mysql_close_memory(mysql);
|
mysql_close_memory(mysql);
|
||||||
if (!(client_flag & CLIENT_REMEMBER_OPTIONS))
|
if (!(client_flag & CLIENT_REMEMBER_OPTIONS) &&
|
||||||
|
!mysql->options.extension->async_context)
|
||||||
mysql_close_options(mysql);
|
mysql_close_options(mysql);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user