twain_32: Add missing HeapFree's on error patch (found by smatch).
Michael Stefaniuc
mstefani at redhat.de
Mon May 8 17:51:58 CDT 2006
---
dlls/twain_32/dsm_ctrl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
249a81b7849c886ca95bfb39d352b784ab6885f1
diff --git a/dlls/twain_32/dsm_ctrl.c b/dlls/twain_32/dsm_ctrl.c
index 75d5c64..53863b6 100644
--- a/dlls/twain_32/dsm_ctrl.c
+++ b/dlls/twain_32/dsm_ctrl.c
@@ -233,12 +233,14 @@ TW_UINT16 TWAIN_OpenDS (pTW_IDENTITY pOr
if (!hmod) {
ERR("Failed to load TWAIN Source %s\n", modname);
DSM_twCC = TWCC_OPERATIONERROR;
+ HeapFree(GetProcessHeap(), 0, newSource);
return TWRC_FAILURE;
}
newSource->hmod = hmod;
newSource->dsEntry = (DSENTRYPROC)GetProcAddress(hmod, "DS_Entry");
if (TWRC_SUCCESS != newSource->dsEntry (pOrigin, DG_CONTROL, DAT_IDENTITY, MSG_OPENDS, pIdentity)) {
DSM_twCC = TWCC_OPERATIONERROR;
+ HeapFree(GetProcessHeap(), 0, newSource);
return TWRC_FAILURE;
}
/* Assign name and id for the opened data source */
--
1.3.2
--
Michael Stefaniuc Tel.: +49-711-96437-199
Sr. Network Engineer Fax.: +49-711-96437-111
Red Hat GmbH Email: mstefani at redhat.com
Hauptstaetterstr. 58 http://www.redhat.de/
D-70178 Stuttgart
-------------- 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/20060509/aa21c832/attachment.pgp
More information about the wine-patches
mailing list