mirror of
https://github.com/n5ac/smartsdr-dsp.git
synced 2026-01-03 15:09:59 +01:00
CID11720 - Minor memory leak when a discovery packet is invalid
This commit is contained in:
parent
890d03c154
commit
5acf31bb38
|
|
@ -204,10 +204,11 @@ static void _dc_ListenerParsePacket(uint8* packet, int32 length, struct sockaddr
|
|||
}
|
||||
|
||||
// did we get at least an IP, port, and version?
|
||||
if(radio->ip != 0 && radio->port != 0 && radio->version != 0)
|
||||
{
|
||||
if(radio->ip != 0 && radio->port != 0 && radio->version != 0) {
|
||||
// yes -- report the radio as found
|
||||
_dc_RadioFound(radio);
|
||||
} else {
|
||||
safe_free(radio);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue