From 94b68fbad691d623b232e96df3a94bd01d5c71b3 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:17:53 +0200 Subject: [PATCH] Remove redundant check in mysqlnd_fetch_stmt_row_cursor result is always non-NULL because it is dereferenced above. Similarly, result->unbuf and stmt must also be non-NULL. --- ext/mysqlnd/mysqlnd_ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index 87d0ba738a67..5b81eb8e211e 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -764,7 +764,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_ptr, const unsign DBG_ENTER("mysqlnd_fetch_stmt_row_cursor"); - if (!stmt || !stmt->conn || !result || !result->conn || !result->unbuf) { + if (!stmt->conn || !result->conn) { DBG_ERR("no statement"); DBG_RETURN(FAIL); }