]> granicus.if.org Git - php/commitdiff
add NULL check
authorAnatol Belski <ab@php.net>
Mon, 29 Feb 2016 14:26:57 +0000 (15:26 +0100)
committerAnatol Belski <ab@php.net>
Mon, 29 Feb 2016 14:26:57 +0000 (15:26 +0100)
ext/pdo_dblib/dblib_stmt.c

index 2e3e881943375ff2487f264a9fcd8ead4df28abb..387648244f6c7af8c06a0b8da3039e5d564087bc 100644 (file)
@@ -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;
 }