Skip to content

Commit

Permalink
Add missing FREE_BINDS to prepared statement streaming error case (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Apr 7, 2018
1 parent e30a3e0 commit 4410099
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/mysql2/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ static VALUE rb_mysql_stmt_execute(int argc, VALUE *argv, VALUE self) {
if (is_streaming) {
unsigned long type = CURSOR_TYPE_READ_ONLY;
if (mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &type)) {
FREE_BINDS;
rb_raise(cMysql2Error, "Unable to stream prepared statement, could not set CURSOR_TYPE_READ_ONLY");
}
}
Expand Down

0 comments on commit 4410099

Please sign in to comment.