Commit cd6472f7 authored by Lionel Debroux's avatar Lionel Debroux Committed by Alexandre Julliard

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

parent e2fc6c35
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment