Wine-20050111 vendor drop
Added: vendor/wine/dlls/cabinet/Wine-20040511/
Modified: vendor/wine/dlls/cabinet/Wine-20040511/cabinet_main.c
Modified: vendor/wine/dlls/cabinet/Wine-20040511/fdi.c
Modified: vendor/wine/dlls/cabinet/current/cabinet_main.c
Modified: vendor/wine/dlls/cabinet/current/fdi.c

Copied: vendor/wine/dlls/cabinet/Wine-20040511 (from rev 12927, vendor/wine/dlls/cabinet/current)

Modified: vendor/wine/dlls/cabinet/Wine-20040511/cabinet_main.c
--- vendor/wine/dlls/cabinet/current/cabinet_main.c	2005-01-11 20:23:48 UTC (rev 12927)
+++ vendor/wine/dlls/cabinet/Wine-20040511/cabinet_main.c	2005-01-11 21:26:55 UTC (rev 12928)
@@ -121,8 +121,10 @@
   TRACE("extracting to dir: %s\n", debugstr_a(dir));
 
   /* FIXME: what to do on failure? */
-  if (!process_cabinet(what, dir, FALSE, FALSE, dest))
+  if (!process_cabinet(what, dir, FALSE, FALSE, dest)) {
+    LocalFree(dir);
     return E_OUTOFMEMORY;
+  }
 
   LocalFree(dir);
 

Modified: vendor/wine/dlls/cabinet/Wine-20040511/fdi.c
--- vendor/wine/dlls/cabinet/current/fdi.c	2005-01-11 20:23:48 UTC (rev 12927)
+++ vendor/wine/dlls/cabinet/Wine-20040511/fdi.c	2005-01-11 21:26:55 UTC (rev 12928)
@@ -2696,14 +2696,20 @@
   }
 
   /* free decompression temps */
-  if (LZX(window)) {
-    PFDI_FREE(hfdi, LZX(window));
-    LZX(window) = NULL;
+  switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+  case cffoldCOMPTYPE_LZX:
+    if (LZX(window)) {
+      PFDI_FREE(hfdi, LZX(window));
+      LZX(window) = NULL;
+    }
+    break;
+  case cffoldCOMPTYPE_QUANTUM:
+    if (QTM(window)) {
+      PFDI_FREE(hfdi, QTM(window));
+      QTM(window) = NULL;
+    }
+    break;
   }
-  if (QTM(window)) {
-    PFDI_FREE(hfdi, QTM(window));
-    QTM(window) = NULL;
-  }
 
   while (decomp_state) {
     fdi_decomp_state *prev_fds;
@@ -2738,14 +2744,20 @@
   bail_and_fail: /* here we free ram before error returns */
 
   /* free decompression temps */
-  if (LZX(window)) {
-    PFDI_FREE(hfdi, LZX(window));
-    LZX(window) = NULL;
+  switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+  case cffoldCOMPTYPE_LZX:
+    if (LZX(window)) {
+      PFDI_FREE(hfdi, LZX(window));
+      LZX(window) = NULL;
+    }
+    break;
+  case cffoldCOMPTYPE_QUANTUM:
+    if (QTM(window)) {
+      PFDI_FREE(hfdi, QTM(window));
+      QTM(window) = NULL;
+    }
+    break;
   }
-  if (QTM(window)) {
-    PFDI_FREE(hfdi, QTM(window));
-    QTM(window) = NULL;
-  }
 
   while (decomp_state) {
     fdi_decomp_state *prev_fds;

Modified: vendor/wine/dlls/cabinet/current/cabinet_main.c
--- vendor/wine/dlls/cabinet/current/cabinet_main.c	2005-01-11 20:23:48 UTC (rev 12927)
+++ vendor/wine/dlls/cabinet/current/cabinet_main.c	2005-01-11 21:26:55 UTC (rev 12928)
@@ -121,8 +121,10 @@
   TRACE("extracting to dir: %s\n", debugstr_a(dir));
 
   /* FIXME: what to do on failure? */
-  if (!process_cabinet(what, dir, FALSE, FALSE, dest))
+  if (!process_cabinet(what, dir, FALSE, FALSE, dest)) {
+    LocalFree(dir);
     return E_OUTOFMEMORY;
+  }
 
   LocalFree(dir);
 

Modified: vendor/wine/dlls/cabinet/current/fdi.c
--- vendor/wine/dlls/cabinet/current/fdi.c	2005-01-11 20:23:48 UTC (rev 12927)
+++ vendor/wine/dlls/cabinet/current/fdi.c	2005-01-11 21:26:55 UTC (rev 12928)
@@ -2696,14 +2696,20 @@
   }
 
   /* free decompression temps */
-  if (LZX(window)) {
-    PFDI_FREE(hfdi, LZX(window));
-    LZX(window) = NULL;
+  switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+  case cffoldCOMPTYPE_LZX:
+    if (LZX(window)) {
+      PFDI_FREE(hfdi, LZX(window));
+      LZX(window) = NULL;
+    }
+    break;
+  case cffoldCOMPTYPE_QUANTUM:
+    if (QTM(window)) {
+      PFDI_FREE(hfdi, QTM(window));
+      QTM(window) = NULL;
+    }
+    break;
   }
-  if (QTM(window)) {
-    PFDI_FREE(hfdi, QTM(window));
-    QTM(window) = NULL;
-  }
 
   while (decomp_state) {
     fdi_decomp_state *prev_fds;
@@ -2738,14 +2744,20 @@
   bail_and_fail: /* here we free ram before error returns */
 
   /* free decompression temps */
-  if (LZX(window)) {
-    PFDI_FREE(hfdi, LZX(window));
-    LZX(window) = NULL;
+  switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+  case cffoldCOMPTYPE_LZX:
+    if (LZX(window)) {
+      PFDI_FREE(hfdi, LZX(window));
+      LZX(window) = NULL;
+    }
+    break;
+  case cffoldCOMPTYPE_QUANTUM:
+    if (QTM(window)) {
+      PFDI_FREE(hfdi, QTM(window));
+      QTM(window) = NULL;
+    }
+    break;
   }
-  if (QTM(window)) {
-    PFDI_FREE(hfdi, QTM(window));
-    QTM(window) = NULL;
-  }
 
   while (decomp_state) {
     fdi_decomp_state *prev_fds;