]> granicus.if.org Git - php/commitdiff
- Fix SEGV in case ctor failed
authorMarcus Boerger <helly@php.net>
Wed, 28 Jul 2004 00:01:12 +0000 (00:01 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 28 Jul 2004 00:01:12 +0000 (00:01 +0000)
ext/pdo/pdo_dbh.c

index 8b60718eaba95ffbfcafce0dfb919842d963e418..fdccf05db5685372628775da8f281fc61a82d927 100755 (executable)
@@ -667,7 +667,9 @@ static void pdo_dbh_free_storage(zend_object *object TSRMLS_DC)
        if(dbh->properties) {
                zend_hash_destroy(dbh->properties);
        }
-       dbh->methods->closer(dbh TSRMLS_CC);
+       if (dbh->methods) {
+               dbh->methods->closer(dbh TSRMLS_CC);
+       }
 
        if (dbh->data_source) {
                pefree((char *)dbh->data_source, dbh->is_persistent);