mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Fix double-free of packet buffer
This commit is contained in:
parent
67b70e9cbd
commit
343eeccaa9
@ -165,7 +165,6 @@ static void ReceiveThreadProc(void* context) {
|
|||||||
packet->size = (int)recv(rtpSocket, &packet->data[0], MAX_PACKET_SIZE, 0);
|
packet->size = (int)recv(rtpSocket, &packet->data[0], MAX_PACKET_SIZE, 0);
|
||||||
if (packet->size <= 0) {
|
if (packet->size <= 0) {
|
||||||
Limelog("Audio Receive: recv() failed: %d\n", (int)LastSocketError());
|
Limelog("Audio Receive: recv() failed: %d\n", (int)LastSocketError());
|
||||||
free(packet);
|
|
||||||
ListenerCallbacks.connectionTerminated(LastSocketError());
|
ListenerCallbacks.connectionTerminated(LastSocketError());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user