msi: Fix the return value of msi_copy_outval in the error case.

Gerald Pfeifer gerald at pfeifer.com
Fri May 7 14:22:34 CDT 2010


It's surprising how many cases of incorrect / half baken error handling
we seem to have?

Gerald
---
 dlls/msi/msi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 646963d..3170e6d 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -1216,7 +1216,7 @@ done:
 
 static UINT msi_copy_outval(LPWSTR val, LPWSTR out, LPDWORD size)
 {
-    UINT r;
+    UINT r = ERROR_SUCCESS;
 
     if (!val)
         return ERROR_UNKNOWN_PROPERTY;
@@ -1236,7 +1236,7 @@ static UINT msi_copy_outval(LPWSTR val, LPWSTR out, LPDWORD size)
     if (size)
         *size = lstrlenW(val);
 
-    return ERROR_SUCCESS;
+    return r;
 }
 
 UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
-- 
1.6.6.2



More information about the wine-patches mailing list