Wireshark mailing list archives
Re: [PATCH] reduce scope of and close a file descriptor in wsutil/sha1.c
From: Jakub Zawadzki <darkjames-ws () darkjames pl>
Date: Mon, 9 Jun 2014 22:43:16 +0200
On Mon, Jun 09, 2014 at 07:32:49PM +0200, Toralf Förster wrote:
spotted by cppcheck
Signed-off-by: Toralf Förster <toralf.foerster () gmx de>
---
wsutil/sha1.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/wsutil/sha1.c b/wsutil/sha1.c
index fcafd2b..081881a 100644
--- a/wsutil/sha1.c
+++ b/wsutil/sha1.c
@@ -426,6 +427,8 @@ int main( int argc, char *argv[] )
{
sha1_update( &ctx, buf, i );
}
+
+ ws_close(f);
^^^ fclose(f) ?
ws_close() seems to be taking file descriptor.
Cheers,
Jakub.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- [PATCH] reduce scope of and close a file descriptor in wsutil/sha1.c Toralf Förster (Jun 09)
- Re: [PATCH] reduce scope of and close a file descriptor in wsutil/sha1.c Jakub Zawadzki (Jun 09)
- Re: [PATCH] reduce scope of and close a file descriptor in wsutil/sha1.c Guy Harris (Jun 09)
- Re: [PATCH] reduce scope of and close a file descriptor in wsutil/sha1.c Jakub Zawadzki (Jun 09)
