From 860f96f4310a0ec746a2804bb208e4be3389056f Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 17 Feb 2019 20:46:47 +0100 Subject: [PATCH] [MSI] Prevent uninitialized variable usage --- dll/win32/msi/source.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) -- 2.17.1