Skip to content

Commit 31d8633

Browse files
Fixed bug resulting in a segfault on some platforms when using two-phase
commit.
1 parent bb786a3 commit 31d8633

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

doc/src/releasenotes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ ODPI-C Release notes
44
Version 5.0.1 (TBD)
55
-------------------
66

7+
#) Fixed bug resulting in a segfault on some platforms when using two-phase
8+
commit.
9+
710

811
Version 5.0 (August 15, 2023)
912
-----------------------------

src/dpiConn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,10 @@ void dpiConn__free(dpiConn *conn, dpiError *error)
561561
conn->pool = NULL;
562562
conn->env = NULL;
563563
}
564+
if (conn->transactionHandle) {
565+
dpiOci__handleFree(conn->transactionHandle, DPI_OCI_HTYPE_TRANS);
566+
conn->transactionHandle = NULL;
567+
}
564568
if (conn->env) {
565569
dpiEnv__free(conn->env, error);
566570
conn->env = NULL;
@@ -581,10 +585,6 @@ void dpiConn__free(dpiConn *conn, dpiError *error)
581585
dpiHandleList__free(conn->objects);
582586
conn->objects = NULL;
583587
}
584-
if (conn->transactionHandle) {
585-
dpiOci__handleFree(conn->transactionHandle, DPI_OCI_HTYPE_TRANS);
586-
conn->transactionHandle = NULL;
587-
}
588588
dpiUtils__freeMemory(conn);
589589
}
590590

0 commit comments

Comments
 (0)