Skip to content

Commit 46a5476

Browse files
committed
Fix crash doing release after failed terminate
1 parent b725c0e commit 46a5476

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dpi/src/dpiPoolImpl.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ PoolImpl::~PoolImpl()
166166

167167
void PoolImpl::terminate()
168168
{
169+
if (poolName_)
170+
{
171+
ociCall( OCISessionPoolDestroy( spoolh_, errh_, OCI_DEFAULT), errh_);
172+
poolName_ = NULL;
173+
}
169174
env_->terminatePool(this);
170175
}
171176

@@ -343,7 +348,8 @@ void PoolImpl::cleanup()
343348
{
344349
if (poolName_)
345350
{
346-
ociCall( OCISessionPoolDestroy( spoolh_, errh_, OCI_DEFAULT), errh_);
351+
// Ignore errors thrown.
352+
OCISessionPoolDestroy( spoolh_, errh_, OCI_DEFAULT);
347353
poolName_ = NULL;
348354
}
349355

0 commit comments

Comments
 (0)