mirror of
https://github.com/php/php-src.git
synced 2026-03-30 20:22:36 +02:00
Don't dereference NULL-pointer
This commit is contained in:
@@ -966,13 +966,14 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla
|
||||
php_mysql_packet_row *row_packet = result->row_packet;
|
||||
|
||||
DBG_ENTER("mysqlnd_fetch_stmt_row_cursor");
|
||||
DBG_INF_FMT("stmt=%lu flags=%u", stmt->stmt_id, flags);
|
||||
|
||||
if (!stmt) {
|
||||
DBG_ERR("no statement");
|
||||
DBG_RETURN(FAIL);
|
||||
}
|
||||
|
||||
DBG_INF_FMT("stmt=%lu flags=%u", stmt->stmt_id, flags);
|
||||
|
||||
if (stmt->state < MYSQLND_STMT_USER_FETCHING) {
|
||||
/* Only initted - error */
|
||||
SET_CLIENT_ERROR(stmt->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE,
|
||||
|
||||
Reference in New Issue
Block a user