Skip to content

Commit

Permalink
qoci spatial driver: cleanup session & connection when login failed
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 18, 2015
1 parent 88b14c0 commit 4789c23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/providers/oracle/ocispatial/qsql_ocispatial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4789c23

Please sign in to comment.