Skip to content

Commit 4410099

Browse files
committed
Add missing FREE_BINDS to prepared statement streaming error case (#958)
1 parent e30a3e0 commit 4410099

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/mysql2/statement.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ static VALUE rb_mysql_stmt_execute(int argc, VALUE *argv, VALUE self) {
431431
if (is_streaming) {
432432
unsigned long type = CURSOR_TYPE_READ_ONLY;
433433
if (mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &type)) {
434+
FREE_BINDS;
434435
rb_raise(cMysql2Error, "Unable to stream prepared statement, could not set CURSOR_TYPE_READ_ONLY");
435436
}
436437
}

0 commit comments

Comments
 (0)