From f02f39f60c9843e16b741ce69a7361dc5e831d0e Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 4 Feb 2009 00:56:39 +0100 Subject: [PATCH] twain_32/tests: Don't leak memory on an error path (Smatch). --- dlls/twain_32/tests/dsm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c index cf9acef5564..8f8e926ff0c 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; }