mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 08:09:34 -05:00
Fix up some locking
This commit is contained in:
parent
d773c7178f
commit
e8ac75d22f
1 changed files with 9 additions and 3 deletions
|
|
@ -275,6 +275,8 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize )
|
|||
err = db_create( &ret, ldbm_Env, 0 );
|
||||
if ( err != 0 ) {
|
||||
(void)ret->close(ret, 0);
|
||||
LDBM_UNLOCK;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -283,12 +285,16 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize )
|
|||
|
||||
err = ret->open( ret, name, NULL, DB_TYPE, rw, mode);
|
||||
|
||||
LDBM_UNLOCK;
|
||||
|
||||
if ( err != 0 ) {
|
||||
int tmp = errno;
|
||||
(void)ret->close(ret, 0);
|
||||
errno = tmp;
|
||||
|
||||
LDBM_UNLOCK;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LDBM_UNLOCK;
|
||||
|
||||
#elif DB_VERSION_MAJOR >= 2
|
||||
DB_INFO dbinfo;
|
||||
|
|
@ -336,7 +342,7 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize )
|
|||
LDBM_UNLOCK;
|
||||
#endif
|
||||
|
||||
return( ret );
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue