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
1 changed files with 0 additions and 2 deletions

View File

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