[CABINET]

- always close the cabinet after being done, even of case of failure.

svn path=/trunk/; revision=56045
This commit is contained in:
Jérôme Gardou 2012-03-05 18:51:05 +00:00
parent 97fa0caa77
commit c3d23e2e30

View file

@ -2105,7 +2105,7 @@ bool CCabinet::CreateSimpleCabinet()
if (Status != CAB_STATUS_SUCCESS) if (Status != CAB_STATUS_SUCCESS)
{ {
DPRINT(MIN_TRACE, ("Cannot create cabinet (%u).\n", (UINT)Status)); DPRINT(MIN_TRACE, ("Cannot create cabinet (%u).\n", (UINT)Status));
goto cleanup; goto cleanup2;
} }
// Add each file in the criteria list // Add each file in the criteria list
@ -2217,10 +2217,11 @@ bool CCabinet::CreateSimpleCabinet()
goto cleanup; goto cleanup;
} }
cleanup:
CloseCabinet(); CloseCabinet();
bRet = true; bRet = true;
cleanup: cleanup2:
DestroySearchCriteria(); DestroySearchCriteria();
return bRet; return bRet;
} }