add sanity checks

This commit is contained in:
Wez Furlong 2005-07-27 14:18:01 +00:00
parent a6f0d99e5b
commit bf85bf515e

View File

@ -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;
}