aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-02-15 20:01:24 +0000
committerGuy Harris <guy@alum.mit.edu>2005-02-15 20:01:24 +0000
commitea7ef54b0da23a170ed61de375f281f592d6f551 (patch)
tree9475d6f687f0a379c3fb2b6e178320d7dbc32d80 /file.c
parent1aa4357464da99ee93588e1145cb549105f6b1a3 (diff)
Have "cf_merge_files()" always close "out_fd" before returning; it does
so if "wtap_dump_fdopen()" succeeds (as a side-effect of calling "wtap_dump_close()"), even if "cf_merge_fails()" after that, so it should do so if it fails. That means we don't need to close it in the callers of "cf_merge_files()". svn path=/trunk/; revision=13407
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index 01d06f5444..09d074038f 100644
--- a/file.c
+++ b/file.c
@@ -981,6 +981,7 @@ cf_merge_files(const char *out_filename, int out_fd, int in_file_count,
merge_select_frame_type(in_file_count, in_files),
merge_max_snapshot_length(in_file_count, in_files), &open_err);
if (pdh == NULL) {
+ close(out_fd);
merge_close_in_files(in_file_count, in_files);
free(in_files);
cf_open_failure_alert_box(out_filename, open_err, err_info, TRUE,