]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/lock.c
fix database operations in tool mode (ITS#3622)
[openldap] / servers / slapd / lock.c
index 9d42fc620e6d7eaf627d13a938f546221b81e3f1..1a8fc52a5786a9b9f092cc258867c4588d276d95 100644 (file)
@@ -74,9 +74,10 @@ lock_fopen( const char *fname, const char *type, FILE **lfp )
 int
 lock_fclose( FILE *fp, FILE *lfp )
 {
+       int rc = fclose( fp );
        /* unlock */
        ldap_unlockf( fileno(lfp) );
        fclose( lfp );
 
-       return( fclose( fp ) );
+       return( rc );
 }