Skip to content

Commit

Permalink
Fix memleak found with AddressSanitizer/LeakSanitizer
Browse files Browse the repository at this point in the history
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
    f4exb#1 0x7ff256723dd0 in MainCore::appendFeatureSet() sdrbase/maincore.cpp:190
    f4exb#2 0x7ff25817fb89 in MainWindow::addFeatureSet() sdrgui/mainwindow.cpp:1191
    f4exb#3 0x7ff25815a4d0 in MainWindow::MainWindow(qtwebapp::LoggerWithFile*, MainParser const&, QWidget*) sdrgui/mainwindow.cpp:250
    f4exb#4 0x559632289175 in runQtApplication app/main.cpp:196
    f4exb#5 0x559632286ab7 in main app/main.cpp:248
    f4exb#6 0x7ff252e456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
  • Loading branch information
dforsi committed May 19, 2024
1 parent b642c22 commit dc02609
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sdrbase/maincore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ void MainCore::removeLastFeatureSet()
FeatureSet *featureSet = m_featureSets.back();
m_featureSetsMap.remove(featureSet);
m_featureSets.pop_back();
delete featureSet;
}
}

Expand Down

0 comments on commit dc02609

Please sign in to comment.