Skip to content
Permalink
Browse files

qoci spatial driver: cleanup session & connection when login failed

  • Loading branch information
jef-n committed Mar 17, 2015
1 parent 23d6b66 commit db2363234e8b6d3b5586e6497989f85df545de71
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/providers/oracle/ocispatial/qsql_ocispatial.cpp
@@ -3449,10 +3449,16 @@ bool QOCISpatialDriver::open( const QString & db,
setLastError( qMakeError( tr( "Unable to logon" ), QSqlError::ConnectionError, d->err ) );
setOpenError( true );
if ( d->authp )
{
OCISessionEnd( d->svc, d->err, d->authp, OCI_DEFAULT );
OCIHandleFree( d->authp, OCI_HTYPE_SESSION );
}
d->authp = 0;
if ( d->srvhp )
{
OCIServerDetach( d->srvhp, d->err, OCI_DEFAULT );
OCIHandleFree( d->srvhp, OCI_HTYPE_SERVER );
}
d->srvhp = 0;
return false;
}

0 comments on commit db23632

Please sign in to comment.
You can’t perform that action at this time.