From: Mark Jansen Date: Sun, 17 Feb 2019 19:46:47 +0000 (+0100) Subject: [MSI] Prevent uninitialized variable usage X-Git-Tag: 0.4.13-dev~370 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=860f96f4310a0ec746a2804bb208e4be3389056f;hp=2fade6ede43f36eab7510ed9089d3da951b1d74c [MSI] Prevent uninitialized variable usage --- diff --git a/dll/win32/msi/source.c b/dll/win32/msi/source.c index 7f55775b05d..960324b11db 100644 --- a/dll/win32/msi/source.c +++ b/dll/win32/msi/source.c @@ -592,8 +592,11 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, 0, 0, NULL, &size); if (rc != ERROR_SUCCESS) { - RegCloseKey(sourcekey); - return ERROR_SUCCESS; + static WCHAR szEmpty[1] = { '\0' }; + rc = ERROR_SUCCESS; + source = NULL; + ptr = szEmpty; + goto output_out; } source = msi_alloc(size); @@ -627,7 +630,7 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, else ptr++; } - +output_out: if (szValue) { if (strlenW(ptr) < *pcchValue)