[WINESYNC] msi: Fix memory leak in get_fusion_filename (Coverity).

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id ad90181e1407bc4ffe81e55f07f83b23c09cccb8 by Alex Henrie <alexhenrie24@gmail.com>
This commit is contained in:
winesync 2022-03-14 21:12:25 +01:00 committed by Mark Jansen
parent 6aefc5b976
commit 848267813e
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -559,6 +559,7 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
GetWindowsDirectoryW(windir, MAX_PATH);
len = lstrlenW(windir) + lstrlenW(L"Microsoft.NET\\Framework\\") + lstrlenW(L"v2.0.50727") +
lstrlenW(L"fusion.dll") + 3;
msi_free(filename);
if (!(filename = msi_alloc(len * sizeof(WCHAR)))) return NULL;
lstrcpyW(filename, windir);