Piotr Caban : oleacc: Fix allocation error handling in ObjectFromLresult.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Oct 6 15:19:11 CDT 2014


Module: wine
Branch: master
Commit: 964ab4b6f22fa7930024b8d0475605b0c57a840c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=964ab4b6f22fa7930024b8d0475605b0c57a840c

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Oct  6 10:57:49 2014 +0200

oleacc: Fix allocation error handling in ObjectFromLresult.

---

 dlls/oleacc/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c
index 18a43fb..e5fe6cd 100644
--- a/dlls/oleacc/main.c
+++ b/dlls/oleacc/main.c
@@ -219,10 +219,10 @@ HRESULT WINAPI ObjectFromLresult( LRESULT result, REFIID riid, WPARAM wParam, vo
         return E_FAIL;
 
     data = GlobalAlloc(GMEM_FIXED, size);
-    memcpy(data, view, size);
-    UnmapViewOfFile(view);
     if(!data)
         return E_OUTOFMEMORY;
+    memcpy(data, view, size);
+    UnmapViewOfFile(view);
 
     hr = CreateStreamOnHGlobal(data, TRUE, &stream);
     if(FAILED(hr)) {




More information about the wine-cvs mailing list