aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/file_access.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-12-03 15:15:39 -0800
committerGuy Harris <guy@alum.mit.edu>2016-12-03 23:16:22 +0000
commit99ca028ba535f621b7c5bb57148f1242a3875185 (patch)
treebfd6d1d8c3be7ee40b766c0c85f41644de264846 /wiretap/file_access.c
parenta63c5682bdcb194f190bd8de9f7f27f709a0c8c9 (diff)
Use ws_close(), rather than the UN*X-only close().
Change-Id: Iae29db90273191c10455e172bdd2aac00b12143c Reviewed-on: https://code.wireshark.org/review/19058 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r--wiretap/file_access.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c
index a5a399d436..8650db1b07 100644
--- a/wiretap/file_access.c
+++ b/wiretap/file_access.c
@@ -2404,7 +2404,7 @@ wtap_dump_open_stdout_ng(int file_type_subtype, int encap, int snaplen,
if (new_fd == -1) {
/* dup failed */
*err = errno;
- close(new_fd);
+ ws_close(new_fd);
return NULL;
}
#ifdef _WIN32
@@ -2417,7 +2417,7 @@ wtap_dump_open_stdout_ng(int file_type_subtype, int encap, int snaplen,
if (_setmode(new_fd, O_BINARY) == -1) {
/* "Should not happen" */
*err = errno;
- close(new_fd);
+ ws_close(new_fd);
return NULL;
}
#endif
@@ -2426,7 +2426,7 @@ wtap_dump_open_stdout_ng(int file_type_subtype, int encap, int snaplen,
compressed, shb_hdrs, idb_inf, nrb_hdrs, err);
if (wdh == NULL) {
/* Failed; close the new FD */
- close(new_fd);
+ ws_close(new_fd);
return NULL;
}
return wdh;