From: Christoph von Wittich Date: Sun, 3 Jan 2010 11:51:39 +0000 (+0000) Subject: [cabinet] X-Git-Tag: backups/aicom-network-stable@46924~70 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=009c692de8a8447c03b2385cfc939bd3ca7fae75 [cabinet] sync cabinet to wine 1.1.35 svn path=/trunk/; revision=44908 --- diff --git a/reactos/dll/win32/cabinet/fdi.c b/reactos/dll/win32/cabinet/fdi.c index 61dafdbf6a5..de64f025bd3 100644 --- a/reactos/dll/win32/cabinet/fdi.c +++ b/reactos/dll/win32/cabinet/fdi.c @@ -2519,6 +2519,7 @@ BOOL __cdecl FDICopy( /* slight overestimation here to save CPU cycles in the developer's brain */ if ((pathlen + filenamelen + 3) > MAX_PATH) { ERR("MAX_PATH exceeded.\n"); + PFDI_FREE(hfdi, decomp_state); PFDI_INT(hfdi)->perf->erfOper = FDIERROR_CABINET_NOT_FOUND; PFDI_INT(hfdi)->perf->erfType = ERROR_FILE_NOT_FOUND; PFDI_INT(hfdi)->perf->fError = TRUE; @@ -2540,6 +2541,7 @@ BOOL __cdecl FDICopy( /* get a handle to the cabfile */ cabhf = PFDI_OPEN(hfdi, fullpath, _O_RDONLY|_O_BINARY, _S_IREAD | _S_IWRITE); if (cabhf == -1) { + PFDI_FREE(hfdi, decomp_state); PFDI_INT(hfdi)->perf->erfOper = FDIERROR_CABINET_NOT_FOUND; PFDI_INT(hfdi)->perf->fError = TRUE; SetLastError(ERROR_FILE_NOT_FOUND); @@ -2548,6 +2550,7 @@ BOOL __cdecl FDICopy( if (cabhf == 0) { ERR("PFDI_OPEN returned zero for %s.\n", fullpath); + PFDI_FREE(hfdi, decomp_state); PFDI_INT(hfdi)->perf->erfOper = FDIERROR_CABINET_NOT_FOUND; PFDI_INT(hfdi)->perf->erfType = ERROR_FILE_NOT_FOUND; PFDI_INT(hfdi)->perf->fError = TRUE; @@ -2558,6 +2561,7 @@ BOOL __cdecl FDICopy( /* check if it's really a cabfile. Note that this doesn't implement the bug */ if (!FDI_read_entries(hfdi, cabhf, &fdici, &(CAB(mii)))) { ERR("FDIIsCabinet failed.\n"); + PFDI_FREE(hfdi, decomp_state); PFDI_CLOSE(hfdi, cabhf); return FALSE; }