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

This commit is contained in:
Michael Stefaniuc 2009-02-04 00:56:39 +01:00 committed by Alexandre Julliard
parent 3415f7788c
commit f02f39f60c

View File

@ -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;
}