]> granicus.if.org Git - php/commitdiff
More leak fixes.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 25 May 2004 14:30:07 +0000 (14:30 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 25 May 2004 14:30:07 +0000 (14:30 +0000)
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c

index b61200d61301212d59456870758702722cd737d0..83c1ee4ebaa238d68995c13448cd86a71abb0d54 100755 (executable)
@@ -659,16 +659,16 @@ static void pdo_dbh_free_storage(zend_object *object TSRMLS_DC)
        dbh->methods->closer(dbh TSRMLS_CC);
 
        if (dbh->data_source) {
-               efree((char *)dbh->data_source);
+               pefree((char *)dbh->data_source, dbh->is_persistent);
        }
        if (dbh->username) {
-               efree(dbh->username);
+               pefree(dbh->username, dbh->is_persistent);
        }
        if (dbh->password) {
-               efree(dbh->password);
+               pefree(dbh->password, dbh->is_persistent);
        }
 
-       efree(dbh);
+       pefree(dbh, dbh->is_persistent);
 }
 
 zend_object_value pdo_dbh_new(zend_class_entry *ce TSRMLS_DC)
index 2d70c38659466c8d78c42f8992ab88f975de1c4c..a78db568ec91fe10539782bc7d4b13524960b4ad 100755 (executable)
@@ -526,6 +526,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
        PDO_STMT_CLEAR_ERR();
        MAKE_STD_ZVAL(data);
        if (!do_fetch(stmt, TRUE, data, how TSRMLS_CC)) {
+               FREE_ZVAL(data);
                PDO_HANDLE_STMT_ERR();
                RETURN_FALSE;
        }
@@ -535,6 +536,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
                add_next_index_zval(return_value, data);
                MAKE_STD_ZVAL(data);
        } while (do_fetch(stmt, TRUE, data, how TSRMLS_CC));
+       FREE_ZVAL(data);
 }
 /* }}} */