From c3d23e2e309b990f7a730e598d130f396f5086cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Mon, 5 Mar 2012 18:51:05 +0000 Subject: [PATCH] [CABINET] - always close the cabinet after being done, even of case of failure. svn path=/trunk/; revision=56045 --- reactos/tools/cabman/cabinet.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/tools/cabman/cabinet.cxx b/reactos/tools/cabman/cabinet.cxx index d2e4211f566..18fe3396893 100644 --- a/reactos/tools/cabman/cabinet.cxx +++ b/reactos/tools/cabman/cabinet.cxx @@ -2105,7 +2105,7 @@ bool CCabinet::CreateSimpleCabinet() if (Status != CAB_STATUS_SUCCESS) { DPRINT(MIN_TRACE, ("Cannot create cabinet (%u).\n", (UINT)Status)); - goto cleanup; + goto cleanup2; } // Add each file in the criteria list @@ -2217,10 +2217,11 @@ bool CCabinet::CreateSimpleCabinet() goto cleanup; } +cleanup: CloseCabinet(); bRet = true; -cleanup: +cleanup2: DestroySearchCriteria(); return bRet; }