Skip to content

Commit

Permalink
ADS-B: Fix memory use after delete. For #1734 and part of #2315
Browse files Browse the repository at this point in the history
  • Loading branch information
srcejon committed Nov 12, 2024
1 parent cb4651a commit f03499a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/channelrx/demodadsb/adsbdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ ADSBDemod::~ADSBDemod()
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
delete m_basebandSink; // This results in a call to ADSBDemod::stop(), so need to delete before worker and thread
delete m_worker;
delete m_basebandSink;
delete m_thread;
}

Expand Down
1 change: 1 addition & 0 deletions plugins/channelrx/demodadsb/adsbdemodgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5113,6 +5113,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb

ADSBDemodGUI::~ADSBDemodGUI()
{
m_adsbDemod->setMessageQueueToGUI(nullptr);
disconnect(&MainCore::instance()->getSettings(), &MainSettings::preferenceChanged, this, &ADSBDemodGUI::preferenceChanged);
if (m_templateServer)
{
Expand Down

0 comments on commit f03499a

Please sign in to comment.