twain_32/tests: Don't leak memory on an error path (Smatch).
Michael Stefaniuc
mstefani at redhat.de
Tue Feb 3 17:56:39 CST 2009
---
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;
}
--
1.6.1.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090204/dbb82e18/attachment.pgp
More information about the wine-patches
mailing list