From: Anatol Belski Date: Mon, 29 Feb 2016 14:26:57 +0000 (+0100) Subject: add NULL check X-Git-Tag: php-5.6.20RC1~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a310c3b484051424c4545a00b731b78a4fff7982;p=php add NULL check --- diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index 2e3e881943..387648244f 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -103,8 +103,10 @@ static int pdo_dblib_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC) /* Cancel any pending results */ dbcancel(H->link); - efree(stmt->columns); - stmt->columns = NULL; + if (stmt->columns) { + efree(stmt->columns); + stmt->columns = NULL; + } return 1; }