msi: MsiSourceListEnumMediaDisksW: free original string, not substring.

This commit is contained in:
Dan Kegel 2008-06-03 06:29:29 -07:00 committed by Alexandre Julliard
parent 8f7f203649
commit ecfa0fbcea

View file

@ -304,15 +304,14 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
if (pcchDiskPrompt)
{
data = ptr;
if (!*data)
data++;
if (!*ptr)
ptr++;
size = lstrlenW(data);
size = lstrlenW(ptr);
if (size >= *pcchDiskPrompt)
r = ERROR_MORE_DATA;
else if (szDiskPrompt)
lstrcpyW(szDiskPrompt, data);
lstrcpyW(szDiskPrompt, ptr);
*pcchDiskPrompt = size;
}