aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_stream_dialog.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2020-01-29 09:05:45 +0200
committerAnders Broman <a.broman58@gmail.com>2020-01-30 08:24:50 +0000
commiteb0dcc984f49e58bad3312290b1ee965097bc222 (patch)
tree1641b950c6d2074c0b85c12194705189dd3bde4b /ui/qt/rtp_stream_dialog.cpp
parentaaad273ec1ead7e2203e66536b0c80fce8c72e49 (diff)
RTP: Fix rtpdump export
Broke by 87973bf516432756f6948e969dbe9d6aa8a27017. RtpStreamDialog allocates its own rtpstream_info_t, and copies the original stream's info. Then RtpStreamDialog::on_actionExportAsRtpDump_triggered calls rtpstream_save with this copy. On save, reset_tap_listeners is called, and it clears all the tree items, destroying the allocated copy *before* it is used for the actual export. Trace: 1 rtpstream_info_free_all tap-rtp-common.c 104 2 RtpStreamTreeWidgetItem::~RtpStreamTreeWidgetItem rtp_stream_dialog.cpp 85 3 RtpStreamTreeWidgetItem::~RtpStreamTreeWidgetItem rtp_stream_dialog.cpp 86 4 QTreeModel::clear() 5 RtpStreamDialog::tapReset rtp_stream_dialog.cpp 309 6 rtpstream_reset_cb tap-rtp-common.c 172 7 reset_tap_listeners tap.c 418 8 cf_retap_packets file.c 2243 9 rtpstream_save rtp_stream.c 97 10 RtpStreamDialog::on_actionExportAsRtpDump_triggered rtp_stream_dialog.cpp 515 Bug: 16351 Change-Id: I54d37a2c97997395936df94ee5481b0d6d198aed Reviewed-on: https://code.wireshark.org/review/35979 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/rtp_stream_dialog.cpp')
-rw-r--r--ui/qt/rtp_stream_dialog.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/ui/qt/rtp_stream_dialog.cpp b/ui/qt/rtp_stream_dialog.cpp
index 85a5ef408f..368af73f8f 100644
--- a/ui/qt/rtp_stream_dialog.cpp
+++ b/ui/qt/rtp_stream_dialog.cpp
@@ -74,17 +74,12 @@ class RtpStreamTreeWidgetItem : public QTreeWidgetItem
{
public:
RtpStreamTreeWidgetItem(QTreeWidget *tree, rtpstream_info_t *stream_info) :
- QTreeWidgetItem(tree, rtp_stream_type_)
+ QTreeWidgetItem(tree, rtp_stream_type_),
+ stream_info_(stream_info)
{
- stream_info_=rtpstream_info_malloc_and_copy_deep(stream_info);
drawData();
}
- ~RtpStreamTreeWidgetItem()
- {
- rtpstream_info_free_all(stream_info_);
- }
-
rtpstream_info_t *streamInfo() const { return stream_info_; }
void drawData() {