summaryrefslogtreecommitdiffstats
path: root/source/lib/debug.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-04 08:49:20 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-04 08:49:20 +0000
commitc8a809a2a83974330bc1015d07d69f40a4a09610 (patch)
tree170483d66a6e95114aef632f43fddae599545489 /source/lib/debug.c
parentf79324f730c400342f445c931b0d75ff756d7cc7 (diff)
downloadsamba-c8a809a2a83974330bc1015d07d69f40a4a09610.tar.gz
samba-c8a809a2a83974330bc1015d07d69f40a4a09610.tar.xz
samba-c8a809a2a83974330bc1015d07d69f40a4a09610.zip
Merge from HEAD - baseless parinoia about never having a closed dbf (the debug
file pointer). Andrew Bartlett
Diffstat (limited to 'source/lib/debug.c')
-rw-r--r--source/lib/debug.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/lib/debug.c b/source/lib/debug.c
index 966a53fca34..2efdd3c2a3c 100644
--- a/source/lib/debug.c
+++ b/source/lib/debug.c
@@ -556,6 +556,7 @@ BOOL reopen_logs( void )
pstring fname;
mode_t oldumask;
XFILE *new_dbf = NULL;
+ XFILE *old_dbf = NULL;
BOOL ret = True;
if (stdout_logging)
@@ -585,9 +586,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