summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mysqli/mysqli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 2c56d4fd60..01f4ad1956 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -42,7 +42,7 @@ void php_clear_stmt_bind(STMT *stmt) {
int i;
- if (stmt->stmt)
+ if (stmt->stmt && stmt->stmt->mysql->host)
mysql_stmt_close(stmt->stmt);
if (stmt->var_cnt) {