From d58ff645ffe9c008449f76c8c6243ec7a61de3de Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Mon, 3 Jul 2000 15:05:46 +0000 Subject: [PATCH] @- Fixed crash on OCI?Logon() failure. (thies) --- ext/oci8/oci8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index f12a9e2d50..269db7a10e 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1933,7 +1933,6 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa /* Free Temporary Service Context */ OCIHandleFree((dvoid *) svchp, (ub4) OCI_HTYPE_SVCCTX); - if (exclusive) { psession = session; } else { @@ -2024,12 +2023,13 @@ _oci_close_session(oci_session *session) if (OCI(error) != OCI_SUCCESS) { oci_error(OCI(pError), "_oci_close_session: OCISessionEnd", OCI(error)); } + + OCIHandleFree((dvoid *) svchp, (ub4) OCI_HTYPE_SVCCTX); + } else { oci_debug("_oci_close_session: logging-off DEAD session"); } - OCIHandleFree((dvoid *) svchp, (ub4) OCI_HTYPE_SVCCTX); - if (session->pSession) { OCIHandleFree((dvoid *) session->pSession, (ub4) OCI_HTYPE_SESSION); } -- 2.50.1