Skip to content

Commit 6a06587

Browse files
committed
Bug #52958: Segfault in PDO_OCI on cleanup after running a long testsuite.
1 parent bf9ad4e commit 6a06587

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ PHP NEWS
2020
- PDO_sqlite:
2121
. Fixed bug #63916 (PDO::PARAM_INT casts to 32bit int internally even
2222
on 64bit builds in pdo_sqlite). (srgoogleguy, Lars)
23+
. Fixed bug #52958 (Segfault in PDO_OCI on cleanup after running a long
24+
testsuite) (hswong3i, Lars)
2325

2426
?? ??? 2012, PHP 5.4.11
2527

ext/pdo_oci/oci_driver.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ static int oci_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
227227
H->server = NULL;
228228
}
229229

230-
OCIHandleFree(H->err, OCI_HTYPE_ERROR);
231-
H->err = NULL;
230+
if (H->err) {
231+
OCIHandleFree(H->err, OCI_HTYPE_ERROR);
232+
H->err = NULL;
233+
}
232234

233235
if (H->charset && H->env) {
234236
OCIHandleFree(H->env, OCI_HTYPE_ENV);

0 commit comments

Comments
 (0)