1
0
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:
Robin Getz
2026-08-09 19:53:20 -04:00
parent edd7092444
commit ccc140fbf7
@@ -752,5 +752,7 @@ void VorLocalizerWorker::rrNextTurn()
if (m_msgQueueToFeature) {
m_msgQueueToFeature->push(msg);
} else {
delete msg;
}
}