diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-19 19:53:48 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-19 19:53:48 +0000 |
commit | 14d71d89864c847654382f55f2063e4d3e70d524 (patch) | |
tree | 5606ec0c99f3339674520771f9d218c51f2ea8f0 /capture.c | |
parent | 8f304ff5e1dc404e319123c0e8b73a96ab5ef447 (diff) | |
download | wireshark-14d71d89864c847654382f55f2063e4d3e70d524.tar.gz wireshark-14d71d89864c847654382f55f2063e4d3e70d524.tar.bz2 wireshark-14d71d89864c847654382f55f2063e4d3e70d524.zip |
Close capture file descriptor.
From Mark Burton <markb@ordern.com>
svn path=/trunk/; revision=1986
Diffstat (limited to 'capture.c')
-rw-r--r-- | capture.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* capture.c * Routines for packet capture windows * - * $Id: capture.c,v 1.102 2000/05/18 09:05:25 guy Exp $ + * $Id: capture.c,v 1.103 2000/05/19 19:53:48 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -228,6 +228,7 @@ do_capture(char *capfile_name) error = errno; close(sync_pipe[1]); close(sync_pipe[0]); + close(cf.save_file_fd); unlink(cf.save_file); g_free(cf.save_file); cf.save_file = NULL; @@ -236,6 +237,8 @@ do_capture(char *capfile_name) return; } + close(cf.save_file_fd); + /* Parent process - read messages from the child process over the sync pipe. */ close(sync_pipe[1]); @@ -337,6 +340,7 @@ do_capture(char *capfile_name) } else { /* Not sync mode. */ capture_succeeded = capture(); + close(cf.save_file_fd); if (quit_after_cap) { /* DON'T unlink the save file. Presumably someone wants it. */ gtk_exit(0); |