diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-28 01:11:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:19:01 -0500 |
commit | 67af7a8c4390fcf467f9dfcb932e05bb2ec214d3 (patch) | |
tree | c64375a4db2351c64d5dd0ee265bf4b2e641fef8 /source3/client | |
parent | f18df87fe9f591ff4d1289a79103a8d62a579ff6 (diff) | |
download | samba-67af7a8c4390fcf467f9dfcb932e05bb2ec214d3.tar.gz samba-67af7a8c4390fcf467f9dfcb932e05bb2ec214d3.tar.xz samba-67af7a8c4390fcf467f9dfcb932e05bb2ec214d3.zip |
r16587: Fix Klocwork #1987. Memleak on reusing x_dbf.
Jeremy.
(This used to be commit 16b0617cb0f91fbe1ce53dcb601fe5ed9e51bddf)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 3 | ||||
-rw-r--r-- | source3/client/smbctool.c | 3 |
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; |