Michael Stefaniuc : twain_32/tests: Don't leak memory on an error path ( Smatch).

Alexandre Julliard julliard at winehq.org
Wed Feb 4 09:15:34 CST 2009


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Feb  4 00:56:39 2009 +0100

twain_32/tests: Don't leak memory on an error path (Smatch).

---

 dlls/twain_32/tests/dsm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c
index cf9acef..8f8e926 100644
--- a/dlls/twain_32/tests/dsm.c
+++ b/dlls/twain_32/tests/dsm.c
@@ -87,7 +87,10 @@ static TW_HANDLE alloc_and_set_onevalue(TW_UINT32 val, TW_UINT16 type)
             GlobalUnlock(hcontainer);
         }
         else
+        {
+            GlobalFree(hcontainer);
             hcontainer = 0;
+        }
     }
     return hcontainer;
 }




More information about the wine-cvs mailing list