Prevent containerH being used after it was freed

This commit is contained in:
Michał Janiszewski 2016-06-30 17:24:59 +02:00
parent 78b2e3a02b
commit 1d0596c8d8

View file

@ -273,6 +273,7 @@ int TTWAIN_SetCap(TW_UINT16 cap_id, TW_UINT16 conType, TW_UINT16 itemType,
if (!capabilityH) {
GLOBAL_UNLOCK(containerH);
GLOBAL_FREE(containerH);
containerH = NULL;
goto done;
}