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:
Guy Harris 2021-06-28 14:18:41 -07:00
parent f6be02cd8d
commit ad3e6b1be6
2 changed files with 9 additions and 0 deletions

View File

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

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