Fix memleak found with AddressSanitizer/LeakSanitizer

Found with:
ASAN_OPTIONS="detect_odr_violation=1,strip_path_prefix=$(pwd)/" build/sdrangel

Fixes:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7ff2588f46c8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7ff256723dd0 in MainCore::appendFeatureSet() sdrbase/maincore.cpp:190
    #2 0x7ff25817fb89 in MainWindow::addFeatureSet() sdrgui/mainwindow.cpp:1191
    #3 0x7ff25815a4d0 in MainWindow::MainWindow(qtwebapp::LoggerWithFile*, MainParser const&, QWidget*) sdrgui/mainwindow.cpp:250
    #4 0x559632289175 in runQtApplication app/main.cpp:196
    #5 0x559632286ab7 in main app/main.cpp:248
    #6 0x7ff252e456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Daniele Forsi 2024-04-06 21:00:59 +02:00
rodzic cde8f74435
commit 0dd3f6a353
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -209,6 +209,7 @@ void MainCore::removeLastFeatureSet()
FeatureSet *featureSet = m_featureSets.back();
m_featureSetsMap.remove(featureSet);
m_featureSets.pop_back();
delete featureSet;
}
}