summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--ext/pdo_oci/oci_driver.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 16c0771756..58a50bb944 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 a0377ddb1f..5497bebc64 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);