mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Call me parinoid, but I don't like the idea that we could ever have dbf point
to a closed file. Swap the assign and the close around. Andrew Bartlett
This commit is contained in:
parent
6d201c9616
commit
ceb2a79849
@ -555,6 +555,7 @@ BOOL reopen_logs( void )
|
||||
pstring fname;
|
||||
mode_t oldumask;
|
||||
XFILE *new_dbf = NULL;
|
||||
XFILE *old_dbf = NULL;
|
||||
BOOL ret = True;
|
||||
|
||||
if (stdout_logging)
|
||||
@ -584,9 +585,10 @@ BOOL reopen_logs( void )
|
||||
ret = False;
|
||||
} else {
|
||||
x_setbuf(new_dbf, NULL);
|
||||
if (dbf)
|
||||
(void) x_fclose(dbf);
|
||||
old_dbf = dbf;
|
||||
dbf = new_dbf;
|
||||
if (old_dbf)
|
||||
(void) x_fclose(old_dbf);
|
||||
}
|
||||
|
||||
/* Fix from klausr@ITAP.Physik.Uni-Stuttgart.De
|
||||
|
Loading…
Reference in New Issue
Block a user