Merge pull request #4774 from akallabeth/audin_leak_fix
Fixed leak in audio format processing.
This commit is contained in:
commit
70b3e442ee
@ -255,14 +255,13 @@ static UINT audin_process_formats(AUDIN_PLUGIN* audin, AUDIN_CHANNEL_CALLBACK* c
|
|||||||
rdpsnd_get_audio_tag_string(format.wFormatTag), format.nChannels, format.nSamplesPerSec,
|
rdpsnd_get_audio_tag_string(format.wFormatTag), format.nChannels, format.nSamplesPerSec,
|
||||||
format.nBlockAlign, format.wBitsPerSample, format.cbSize);
|
format.nBlockAlign, format.wBitsPerSample, format.cbSize);
|
||||||
|
|
||||||
if (audin->fixed_format > 0 && audin->fixed_format != format.wFormatTag)
|
if ((audin->fixed_format > 0 && audin->fixed_format != format.wFormatTag) ||
|
||||||
continue;
|
(audin->fixed_channel > 0 && audin->fixed_channel != format.nChannels) ||
|
||||||
|
(audin->fixed_rate > 0 && audin->fixed_rate != format.nSamplesPerSec))
|
||||||
if (audin->fixed_channel > 0 && audin->fixed_channel != format.nChannels)
|
{
|
||||||
continue;
|
free(format.data);
|
||||||
|
|
||||||
if (audin->fixed_rate > 0 && audin->fixed_rate != format.nSamplesPerSec)
|
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (freerdp_dsp_supports_format(&format, TRUE) ||
|
if (freerdp_dsp_supports_format(&format, TRUE) ||
|
||||||
audin->device->FormatSupported(audin->device, &format))
|
audin->device->FormatSupported(audin->device, &format))
|
||||||
|
@ -355,7 +355,7 @@ BOOL rdp_client_disconnect_and_clear(rdpRdp* rdp)
|
|||||||
|
|
||||||
static BOOL rdp_client_reconnect_channels(rdpRdp* rdp, BOOL redirect)
|
static BOOL rdp_client_reconnect_channels(rdpRdp* rdp, BOOL redirect)
|
||||||
{
|
{
|
||||||
BOOL status;
|
BOOL status = FALSE;
|
||||||
rdpContext* context;
|
rdpContext* context;
|
||||||
rdpChannels* channels;
|
rdpChannels* channels;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user