[MMIXER] Fix memory leak in MMixerGetDeviceNameWithComponentId. CORE-16611

This commit is contained in:
Thomas Faber 2020-02-01 12:35:41 +01:00
parent e4e86c32e7
commit 756aa270b1
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -838,6 +838,7 @@ MMixerGetDeviceNameWithComponentId(
if (Status == MM_STATUS_SUCCESS)
{
MixerContext->Copy(OutDeviceName, DeviceName, min(ResultLength, (MAXPNAMELEN-1)*2));
MixerContext->Free(DeviceName);
}
MixerContext->CloseKey(hGuidKey);