Commit 8d7dcb65 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

twain_32: Add missing HeapFree's on error patch (found by smatch).

parent 81c2ef54
......@@ -233,12 +233,14 @@ TW_UINT16 TWAIN_OpenDS (pTW_IDENTITY pOrigin, TW_MEMREF pData)
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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment