msdmo: Next() method should use CoTaskMemAlloc() for returned names.

This commit is contained in:
Nikolay Sivov 2015-04-23 09:40:15 +03:00 committed by Alexandre Julliard
parent 65bf359d6f
commit 3f7c47118a
1 changed files with 1 additions and 1 deletions

View File

@ -636,7 +636,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
ret = RegQueryValueExW(hkey, NULL, NULL, NULL, (LPBYTE)szValue, &len);
if (ERROR_SUCCESS == ret)
{
Names[count] = HeapAlloc(GetProcessHeap(), 0, (strlenW(szValue) + 1) * sizeof(WCHAR));
Names[count] = CoTaskMemAlloc((strlenW(szValue) + 1) * sizeof(WCHAR));
if (Names[count])
strcpyW(Names[count], szValue);
}