forked from osmocom/wireshark
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>
This commit is contained in:
parent
e438374990
commit
47f5d41acd
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue