mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 05:30:07 -05:00
ITS#3421 flush and close logfile before releasing lock
This commit is contained in:
parent
0bc4b77527
commit
b803b49e5f
2 changed files with 5 additions and 2 deletions
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,11 +91,13 @@ lock_fclose(
|
|||
FILE *lfp
|
||||
)
|
||||
{
|
||||
int rc = fclose( fp );
|
||||
|
||||
/* unlock */
|
||||
ldap_unlockf( fileno(lfp) );
|
||||
fclose( lfp );
|
||||
|
||||
return( fclose( fp ) );
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue