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.


(cherry picked from commit ad3e6b1be6)
This commit is contained in:
Guy Harris 2021-06-28 14:18:41 -07:00
parent 5318290a05
commit bb4c32b75e
2 changed files with 9 additions and 0 deletions

View File

@ -333,6 +333,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;

View File

@ -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();