diff options
-rw-r--r-- | file.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1382,11 +1382,13 @@ cf_merge_files(char **out_filenamep, int in_file_count, case MERGE_ERR_CANT_OPEN_INFILE: cf_open_failure_alert_box(in_filenames[err_fileno], err, err_info, FALSE, 0); + ws_close(out_fd); break; case MERGE_ERR_CANT_OPEN_OUTFILE: cf_open_failure_alert_box(out_filename, err, err_info, TRUE, file_type); + ws_close(out_fd); break; case MERGE_ERR_CANT_READ_INFILE: /* fall through */ @@ -1399,7 +1401,8 @@ cf_merge_files(char **out_filenamep, int in_file_count, } g_free(err_info); - ws_close(out_fd); + /* for general case, no need to close out_fd: file handle associated to this file + descriptor was already closed by the call to wtap_dump_close() in merge_files() */ if (status != MERGE_OK) { /* Callers aren't expected to treat an error or an explicit abort |