summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/client.c3
-rw-r--r--source3/client/smbctool.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 0a695436f5..3c2d7afe2d 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3464,6 +3464,9 @@ static int do_message_op(void)
}
break;
case 'E':
+ if (dbf) {
+ x_fclose(dbf);
+ }
dbf = x_stderr;
display_set_stderr();
break;
diff --git a/source3/client/smbctool.c b/source3/client/smbctool.c
index 3233ee4955..fd385ee681 100644
--- a/source3/client/smbctool.c
+++ b/source3/client/smbctool.c
@@ -3605,6 +3605,9 @@ static int do_message_op(void)
}
break;
case 'E':
+ if (dbf) {
+ x_fclose(dbf);
+ }
dbf = x_stderr;
display_set_stderr();
break;