com php-src: Bug #52958: Segfault in PDO_OCI on cleanup after running a long testsuite.: NEWS ext/pd o_oci/oci_driver.c
| From: | Lars Strojny | Date: | Mon, 14 Jan 2013 20:35:48 +0000 |
| Subject: | com php-src: Bug #52958: Segfault in PDO_OCI on cleanup after running a long testsuite.: NEWS ext/pd o_oci/oci_driver.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70946@lists.php.net to get a copy of this message | ||
Commit: 6a065876b9212404daaf8fee1708834da83dac56
Author: Lars Strojny <lstrojny@php.net> Mon, 14 Jan 2013 21:35:48 +0100
Parents: bf9ad4e661be4f3eebe3511887e10e521cce7f93
Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6a065876b9212404daaf8fee1708834da83dac56
Log:
Bug #52958: Segfault in PDO_OCI on cleanup after running a long testsuite.
Bugs:
https://bugs.php.net/52958
Changed paths:
M NEWS
M ext/pdo_oci/oci_driver.c
Diff:
diff --git a/NEWS b/NEWS
index 16c0771..58a50bb 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ PHP NEWS
- PDO_sqlite:
. Fixed bug #63916 (PDO::PARAM_INT casts to 32bit int internally even
on 64bit builds in pdo_sqlite). (srgoogleguy, Lars)
+ . Fixed bug #52958 (Segfault in PDO_OCI on cleanup after running a long
+ testsuite) (hswong3i, Lars)
?? ??? 2012, PHP 5.4.11
diff --git a/ext/pdo_oci/oci_driver..c b/ext/pdo_oci/oci_driver.c
index a0377dd..5497beb 100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -227,8 +227,10 @@ static int oci_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
H->server = NULL;
}
- OCIHandleFree(H->err, OCI_HTYPE_ERROR);
- H->err = NULL;
+ if (H->err) {
+ OCIHandleFree(H->err, OCI_HTYPE_ERROR);
+ H->err = NULL;
+ }
if (H->charset && H->env) {
OCIHandleFree(H->env, OCI_HTYPE_ENV);