aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-02 15:55:51 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-02 23:56:33 +0000
commit9979de35e6d607a6ea713ae97a57fc6c00666803 (patch)
treecec0186bef41e3ae3433388af830704f5027384c
parent62e81562e4e3a33dad705b1b66a3407afbde3242 (diff)
Don't fall out of the loop on a write error.
Doing so means we'd close the FD, but we've already closed it. Addresses Coverity CID 1442274. Change-Id: I5aab1bd4b82e9ac0901bcdbc1ddb6b16eec30573 Reviewed-on: https://code.wireshark.org/review/31312 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--ui/export_object_ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/export_object_ui.c b/ui/export_object_ui.c
index 67ec18eb4d..750e432db9 100644
--- a/ui/export_object_ui.c
+++ b/ui/export_object_ui.c
@@ -72,7 +72,7 @@ eo_save_entry(const gchar *save_as_filename, export_object_entry_t *entry)
err = WTAP_ERR_SHORT_WRITE;
report_write_failure(save_as_filename, err);
ws_close(to_fd);
- break;
+ return;
}
bytes_left -= bytes_written;
ptr += bytes_written;