mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-19 09:56:20 -04:00
vorlocalizer: fix leaked report message
Create and populate the VOR service report message as before, but delete it when the feature message queue is not available. The message is normally transferred to `m_msgQueueToFeature` for ownership, but when the queue is null there is no owner and the allocated message leaked. Coverity reported the leak as CID 652338 (`RESOURCE_LEAK`) while analyzing `VorLocalizerWorker::rrNextTurn()`. Review of the surrounding message queue usage confirmed that queued messages are owned by the queue, making the missing-queue path the unhandled ownership case. Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
@@ -752,5 +752,7 @@ void VorLocalizerWorker::rrNextTurn()
|
||||
|
||||
if (m_msgQueueToFeature) {
|
||||
m_msgQueueToFeature->push(msg);
|
||||
} else {
|
||||
delete msg;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user