mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-10 21:50:10 -04:00
Fix memleaks found with AddressSanitizer/LeakSanitizer
Found with: ASAN_OPTIONS="detect_odr_violation=1,strip_path_prefix=$(pwd)/" build/sdrangel Fixes: Direct leak of 56 byte(s) in 1 object(s) allocated from: #0 0x7f9d7d0f46c8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95 #1 0x7f9d7af247aa in MainCore::appendDeviceSet(int) sdrbase/maincore.cpp:219 #2 0x7f9d7c95c8a5 in MainWindow::sampleSourceAdd(Workspace*, Workspace*, int) sdrgui/mainwindow.cpp:359 #3 0x7f9d7c97ce3c in MainWindow::loadConfiguration(Configuration const*, bool) sdrgui/mainwindow.cpp:1439 #4 0x7f9d7c95a610 in MainWindow::MainWindow(qtwebapp::LoggerWithFile*, MainParser const&, QWidget*) sdrgui/mainwindow.cpp:261 #5 0x562f7c492175 in runQtApplication app/main.cpp:196 #6 0x562f7c48fab7 in main app/main.cpp:248 #7 0x7f9d776456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 and 34 others that I'm not copying here.
This commit is contained in:
parent
8647a991a4
commit
cc6aa75912
@ -228,6 +228,7 @@ void MainCore::removeLastDeviceSet()
|
||||
DeviceSet *deviceSet = m_deviceSets.back();
|
||||
m_deviceSetsMap.remove(deviceSet);
|
||||
m_deviceSets.pop_back();
|
||||
delete deviceSet;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user