Fixed memory leak.
This commit is contained in:
parent
62356e667c
commit
854aa3fcfa
@ -381,7 +381,10 @@ void rdpsnd_send_wave_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, BYTE
|
||||
|
||||
void rdpsnd_device_send_wave_confirm_pdu(rdpsndDevicePlugin* device, RDPSND_WAVE* wave)
|
||||
{
|
||||
MessageQueue_Post(device->rdpsnd->queue, NULL, 0, (void*) wave, NULL);
|
||||
RDPSND_WAVE *copy = malloc(sizeof(RDPSND_WAVE));
|
||||
CopyMemory(copy, wave, sizeof(RDPSND_WAVE));
|
||||
|
||||
MessageQueue_Post(device->rdpsnd->queue, NULL, 0, (void*) copy, NULL);
|
||||
}
|
||||
|
||||
static void rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
|
||||
@ -444,6 +447,7 @@ static void rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
|
||||
wave->wLocalTimeB = wave->wLocalTimeA + wave->wAudioLength + TIME_DELAY_MS;
|
||||
rdpsnd->device->WaveConfirm(rdpsnd->device, wave);
|
||||
}
|
||||
free(wave);
|
||||
}
|
||||
|
||||
static void rdpsnd_recv_close_pdu(rdpsndPlugin* rdpsnd)
|
||||
|
Loading…
Reference in New Issue
Block a user