mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-09-15 07:27:23 -04:00
WebServer owns the substitution lists and the Substitution objects stored
in those lists. The destructor previously deleted only the heap-allocated
QList objects, leaving each Substitution allocated by addSubstitution()
leaked.
AddressSanitizer reported:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 <addr> in operator new(unsigned long)
../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
#1 <addr> in WebServer::addSubstitution(QString, QString, QString)
./plugins/feature/map/webserver.cpp:70
Fix deletes the Substitution objects before deleting their containing lists
so the complete substitution hierarchy is released when WebServer is
destroyed.
Found by AddressSanitizer.
Signed-off-by: Robin Getz <[email protected]>