Marcus Meissner : oleacc: Free the mapping on error (Coverity).
Module: wine Branch: master Commit: 9ad8aff7e1286a66cca09ca245ecf3b2b1759fcd URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ad8aff7e1286a66cca09ca245... Author: Marcus Meissner <marcus(a)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);
participants (1)
-
Alexandre Julliard