[CABINET]
authorJérôme Gardou <jerome.gardou@reactos.org>
Mon, 5 Mar 2012 18:51:05 +0000 (18:51 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Mon, 5 Mar 2012 18:51:05 +0000 (18:51 +0000)
 - always close the cabinet after being done, even of case of failure.

svn path=/trunk/; revision=56045

reactos/tools/cabman/cabinet.cxx

index d2e4211..18fe339 100644 (file)
@@ -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;
 }