aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list.cpp
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-09-04 12:22:30 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2015-09-08 06:33:55 +0000
commit47f5d41acd200f88c15bf41a27dfbf488ec5b8d9 (patch)
tree1c3b7776e3bdd77ee9d19f1af36d3cf782f7a47d /ui/qt/packet_list.cpp
parente4383749906bf7ecdf221ba02d9793990865cf26 (diff)
Qt: Fixed a resource leak in getFilterFromRowAndColumn
Found by coverity CID 1314608 and Apple Instruments. Change-Id: I264ce335bd8985946a097bb8f99f7c41c0eb027d Reviewed-on: https://code.wireshark.org/review/10378 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/packet_list.cpp')
-rw-r--r--ui/qt/packet_list.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index 2dea54531a..492f65cffc 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -799,10 +799,10 @@ bool PacketList::contextMenuActive()
return ctx_column_ >= 0 ? true : false;
}
-const QString &PacketList::getFilterFromRowAndColumn()
+QString PacketList::getFilterFromRowAndColumn()
{
frame_data *fdata;
- QString &filter = *new QString();
+ QString filter;
int row = currentIndex().row();
if (!cap_file_ || !packet_list_model_ || ctx_column_ < 0 || ctx_column_ >= cap_file_->cinfo.num_cols) return filter;