aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-19 19:53:48 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-19 19:53:48 +0000
commit14d71d89864c847654382f55f2063e4d3e70d524 (patch)
tree5606ec0c99f3339674520771f9d218c51f2ea8f0 /capture.c
parent8f304ff5e1dc404e319123c0e8b73a96ab5ef447 (diff)
Close capture file descriptor.
From Mark Burton <markb@ordern.com> svn path=/trunk/; revision=1986
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/capture.c b/capture.c
index ecbfc3b555..791b0689a5 100644
--- a/capture.c
+++ b/capture.c
@@ -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);