Skip to content

Commit 14c6bed

Browse files
committed
wait to free mysql* handle until we're freed
1 parent 50b230a commit 14c6bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysql2/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ static VALUE nogvl_close(void *ptr) {
177177
#endif
178178

179179
mysql_close(wrapper->client);
180-
xfree(wrapper->client);
181180
}
182181

183182
return Qnil;
@@ -188,6 +187,7 @@ static void rb_mysql_client_free(void * ptr) {
188187

189188
nogvl_close(wrapper);
190189

190+
xfree(wrapper->client);
191191
xfree(ptr);
192192
}
193193

0 commit comments

Comments
 (0)