Skip to content

Commit db23632

Browse files
committed
qoci spatial driver: cleanup session & connection when login failed
1 parent 23d6b66 commit db23632

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/providers/oracle/ocispatial/qsql_ocispatial.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -3449,10 +3449,16 @@ bool QOCISpatialDriver::open( const QString & db,
34493449
setLastError( qMakeError( tr( "Unable to logon" ), QSqlError::ConnectionError, d->err ) );
34503450
setOpenError( true );
34513451
if ( d->authp )
3452+
{
3453+
OCISessionEnd( d->svc, d->err, d->authp, OCI_DEFAULT );
34523454
OCIHandleFree( d->authp, OCI_HTYPE_SESSION );
3455+
}
34533456
d->authp = 0;
34543457
if ( d->srvhp )
3458+
{
3459+
OCIServerDetach( d->srvhp, d->err, OCI_DEFAULT );
34553460
OCIHandleFree( d->srvhp, OCI_HTYPE_SERVER );
3461+
}
34563462
d->srvhp = 0;
34573463
return false;
34583464
}

0 commit comments

Comments
 (0)