]> granicus.if.org Git - php/commitdiff
Fixed memory leak.
authorIlia Alshanetsky <iliaa@php.net>
Wed, 3 Aug 2005 18:26:16 +0000 (18:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 3 Aug 2005 18:26:16 +0000 (18:26 +0000)
ext/pdo/pdo_stmt.c

index 4c81909897d791045d98c1e9822cd495a31a28f6..b988598e664cf60018ce5fd76d308098d5ed7567 100755 (executable)
@@ -1994,6 +1994,10 @@ static void free_statement(pdo_stmt_t *stmt TSRMLS_DC)
                stmt->columns = NULL;
        }
 
+       if (stmt->fetch.into && stmt->default_fetch_type == PDO_FETCH_INTO) {
+               FREE_ZVAL(stmt->fetch.into);
+               stmt->fetch.into = NULL;
+       }
        
        do_fetch_opt_finish(stmt, 1 TSRMLS_CC);