]> granicus.if.org Git - php/commitdiff
One more memory leak.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 25 May 2004 14:35:49 +0000 (14:35 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 25 May 2004 14:35:49 +0000 (14:35 +0000)
ext/pdo/pdo_stmt.c

index a78db568ec91fe10539782bc7d4b13524960b4ad..be0de292b8199bed212b6833bbb074ebf7d5cd70 100755 (executable)
@@ -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... */