ITS#3421 flush and close logfile before releasing lock

This commit is contained in:
Howard Chu 2005-01-12 00:17:12 +00:00
parent 0bc4b77527
commit b803b49e5f
2 changed files with 5 additions and 2 deletions

View 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 );
}

View file

@ -91,11 +91,13 @@ lock_fclose(
FILE *lfp
)
{
int rc = fclose( fp );
/* unlock */
ldap_unlockf( fileno(lfp) );
fclose( lfp );
return( fclose( fp ) );
return( rc );
}