diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2015-09-04 12:22:30 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-09-08 06:33:55 +0000 |
commit | 47f5d41acd200f88c15bf41a27dfbf488ec5b8d9 (patch) | |
tree | 1c3b7776e3bdd77ee9d19f1af36d3cf782f7a47d /ui/qt | |
parent | e4383749906bf7ecdf221ba02d9793990865cf26 (diff) | |
download | wireshark-47f5d41acd200f88c15bf41a27dfbf488ec5b8d9.tar.gz |
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')
-rw-r--r-- | ui/qt/packet_list.cpp | 4 | ||||
-rw-r--r-- | ui/qt/packet_list.h | 2 |
2 files changed, 3 insertions, 3 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; diff --git a/ui/qt/packet_list.h b/ui/qt/packet_list.h index 65195f5087..3ffc5f88af 100644 --- a/ui/qt/packet_list.h +++ b/ui/qt/packet_list.h @@ -66,7 +66,7 @@ public: void clear(); void writeRecent(FILE *rf); bool contextMenuActive(); - const QString &getFilterFromRowAndColumn(); + QString getFilterFromRowAndColumn(); void resetColorized(); QString packetComment(); void setPacketComment(QString new_comment); |