diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-05-21 22:33:37 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-05-25 12:49:50 +0000 |
commit | b078310bd0daf7cf8ba6df765cba9fcd98713dd8 (patch) | |
tree | 35067732a5b84187d7db9ef056a65c852783114b /file.c | |
parent | 0bfdb0f72b459ca4281cbe8e9a673c57bd812e12 (diff) |
Qt: fix use-after-free on error while saving exported packets
When an error occurs while saving packets using the Export Specified
Packets dialog (e.g. try to overwrite the opened capture file), the
dialog is displayed again. As PacketRangeGroupBox freed the packet
selection range, a crash (use-after-free) occurs.
Removes some unnecessary code in MainWindow::exportDissections as well.
Change-Id: I63898427eff7e71799d89c8a22246db8f93a9ff6
Fixes: v2.5.0rc0-968-g38b40acb2d ("Qt: fix a memory leak when exporting packets")
Reviewed-on: https://code.wireshark.org/review/27695
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2114,6 +2114,7 @@ cf_retap_packets(capture_file *cf) "all packets", TRUE, retap_packet, &callback_args, TRUE); + packet_range_cleanup(&range); epan_dissect_cleanup(&callback_args.edt); cf_callback_invoke(cf_cb_file_retap_finished, cf); |