diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-12-03 15:15:39 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-12-03 23:16:22 +0000 |
commit | 99ca028ba535f621b7c5bb57148f1242a3875185 (patch) | |
tree | bfd6d1d8c3be7ee40b766c0c85f41644de264846 /wiretap/file_access.c | |
parent | a63c5682bdcb194f190bd8de9f7f27f709a0c8c9 (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.c | 6 |
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; |