Marcus Meissner : oleacc: Free the mapping on error (Coverity).
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 1 14:53:05 CST 2014
Module: wine
Branch: master
Commit: 9ad8aff7e1286a66cca09ca245ecf3b2b1759fcd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ad8aff7e1286a66cca09ca245ecf3b2b1759fcd
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sun Nov 30 13:09:23 2014 +0100
oleacc: Free the mapping on error (Coverity).
---
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);
More information about the wine-cvs
mailing list