Removed buffer copy, still fixes memory leak.
This commit is contained in:
parent
35a558be9e
commit
6ac0b10158
@ -381,10 +381,7 @@ void rdpsnd_send_wave_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, BYTE
|
|||||||
|
|
||||||
void rdpsnd_device_send_wave_confirm_pdu(rdpsndDevicePlugin* device, RDPSND_WAVE* wave)
|
void rdpsnd_device_send_wave_confirm_pdu(rdpsndDevicePlugin* device, RDPSND_WAVE* wave)
|
||||||
{
|
{
|
||||||
RDPSND_WAVE *copy = malloc(sizeof(RDPSND_WAVE));
|
MessageQueue_Post(device->rdpsnd->queue, NULL, 0, (void*) wave, NULL);
|
||||||
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)
|
static void rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
|
||||||
@ -447,6 +444,7 @@ static void rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
|
|||||||
wave->wLocalTimeB = wave->wLocalTimeA + wave->wAudioLength + TIME_DELAY_MS;
|
wave->wLocalTimeB = wave->wLocalTimeA + wave->wAudioLength + TIME_DELAY_MS;
|
||||||
rdpsnd->device->WaveConfirm(rdpsnd->device, wave);
|
rdpsnd->device->WaveConfirm(rdpsnd->device, wave);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
free(wave);
|
free(wave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user