forked from osmocom/wireshark
wireless timeline: add a destructor to free the hash table.
Destroy the hash table if we're destroying the timeline widget, so that it doesn't leak.
This commit is contained in:
parent
f6be02cd8d
commit
ad3e6b1be6
|
@ -332,6 +332,14 @@ WirelessTimeline::WirelessTimeline(QWidget *parent) : QWidget(parent)
|
|||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(appInitialized()));
|
||||
}
|
||||
|
||||
WirelessTimeline::~WirelessTimeline()
|
||||
{
|
||||
if (radio_packet_list != NULL)
|
||||
{
|
||||
g_hash_table_destroy(radio_packet_list);
|
||||
}
|
||||
}
|
||||
|
||||
void WirelessTimeline::setPacketList(PacketList *packet_list)
|
||||
{
|
||||
this->packet_list = packet_list;
|
||||
|
|
|
@ -52,6 +52,7 @@ class WirelessTimeline : public QWidget
|
|||
|
||||
public:
|
||||
explicit WirelessTimeline(QWidget *parent);
|
||||
~WirelessTimeline();
|
||||
void setPacketList(PacketList *packet_list);
|
||||
void captureFileReadStarted(capture_file *cf);
|
||||
void captureFileReadFinished();
|
||||
|
|
Loading…
Reference in New Issue