[PATCH] oleacc: free the mapping on error (Coverity)

Marcus Meissner marcus at jet.franken.de
Sun Nov 30 06:09:23 CST 2014


1248117 Resource leak
---
 dlls/oleacc/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c
index e5fe6cd..fa7d592 100644
--- a/dlls/oleacc/main.c
+++ b/dlls/oleacc/main.c
@@ -219,8 +219,10 @@ HRESULT WINAPI ObjectFromLresult( LRESULT result, REFIID riid, WPARAM wParam, vo
         return E_FAIL;
 
     data = GlobalAlloc(GMEM_FIXED, size);
-    if(!data)
+    if(!data) {
+        UnmapViewOfFile(view);
         return E_OUTOFMEMORY;
+    }
     memcpy(data, view, size);
     UnmapViewOfFile(view);
 
-- 
1.8.4.5




More information about the wine-patches mailing list