Skip to content

Commit a310c3b

Browse files
committed
add NULL check
1 parent efaafd4 commit a310c3b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/pdo_dblib/dblib_stmt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ static int pdo_dblib_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC)
103103
/* Cancel any pending results */
104104
dbcancel(H->link);
105105

106-
efree(stmt->columns);
107-
stmt->columns = NULL;
106+
if (stmt->columns) {
107+
efree(stmt->columns);
108+
stmt->columns = NULL;
109+
}
108110

109111
return 1;
110112
}

0 commit comments

Comments
 (0)