dplayx: Fixed memory leak in dplay.c (found by Smatch).

This commit is contained in:
Lionel Debroux 2007-09-03 12:38:42 +02:00 committed by Alexandre Julliard
parent e2fc6c35ce
commit cd6472f794

View file

@ -5292,7 +5292,6 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
{
HeapFree(GetProcessHeap(), 0, descriptionA);
max_sizeOfDescriptionA = sizeOfDescription;
descriptionA = HeapAlloc(GetProcessHeap(), 0, max_sizeOfDescriptionA);
}
descriptionA = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription);
RegQueryValueExA(hkServiceProvider, "DescriptionA",
@ -5315,7 +5314,6 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
{
HeapFree(GetProcessHeap(), 0, descriptionW);
max_sizeOfDescriptionW = sizeOfDescription;
descriptionW = HeapAlloc(GetProcessHeap(), 0, max_sizeOfDescriptionW);
}
descriptionW = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription);
RegQueryValueExW(hkServiceProvider, descW,