From 53b5e7f319b0abfeb196a8f810013a11d70dae27 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Thu, 27 Jan 2011 11:56:08 +0100 Subject: [PATCH] msi: Check a return value (clang). --- dlls/msi/source.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index 602f03fd0bb..9b7a9ead3a5 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -1130,6 +1130,12 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid, RegCloseKey(sourcekey); return ERROR_FUNCTION_FAILED; } + if (rc != ERROR_SUCCESS) + { + ERR("can't open subkey %u\n", rc); + RegCloseKey(sourcekey); + return rc; + } postfix = (dwOptions & MSISOURCETYPE_NETWORK) ? szBackSlash : szForwardSlash; if (szSource[lstrlenW(szSource) - 1] == *postfix)