From: Ilia Alshanetsky Date: Tue, 25 May 2004 14:35:49 +0000 (+0000) Subject: One more memory leak. X-Git-Tag: php-5.0.0RC3RC1~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9280b88a8cdc1a5a3fa26cd1bac138354831dcbe;p=php One more memory leak. --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index a78db568ec..be0de292b8 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -793,6 +793,17 @@ void pdo_dbstmt_free_storage(zend_object *object TSRMLS_DC) if (stmt->query_string) { efree(stmt->query_string); } + + if (stmt->column_count) { + int i; + struct pdo_column_data *cols = stmt->columns; + + for (i = 0; i < stmt->column_count; i++) { + efree(cols[i].name); + } + efree(stmt->columns); + } + zend_objects_store_del_ref(&stmt->database_object_handle TSRMLS_CC); #if 0 /* declared in the header, but not implemented... */