From: Wez Furlong Date: Wed, 27 Jul 2005 14:18:01 +0000 (+0000) Subject: add sanity checks X-Git-Tag: RELEASE_2_0_0~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf85bf515ea57f0b6e6fec98025029d1fb73405c;p=php add sanity checks --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index e3b517b3ef..4c81909897 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1985,9 +1985,13 @@ static void free_statement(pdo_stmt_t *stmt TSRMLS_DC) struct pdo_column_data *cols = stmt->columns; for (i = 0; i < stmt->column_count; i++) { - efree(cols[i].name); + if (cols[i].name) { + efree(cols[i].name); + cols[i].name = NULL; + } } efree(stmt->columns); + stmt->columns = NULL; }