https://git.reactos.org/?p=reactos.git;a=commitdiff;h=860f96f4310a0ec746a280...
commit 860f96f4310a0ec746a2804bb208e4be3389056f Author: Mark Jansen mark.jansen@reactos.org AuthorDate: Sun Feb 17 20:46:47 2019 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Mon Feb 18 23:00:54 2019 +0100
[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 7f55775b05..960324b11d 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)