memory leak in filedlg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fixes a memory leak and a wrong memory-free call
Index: wine/dlls/commdlg/filedlg95.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg95.c,v
retrieving revision 1.77
diff -d -u -r1.77 filedlg95.c
--- wine/dlls/commdlg/filedlg95.c	3 Jul 2002 21:06:58 -0000	1.77
+++ wine/dlls/commdlg/filedlg95.c	14 Jul 2002 20:38:17 -0000
@@ -2384,7 +2384,7 @@
     tmpFolder->m_iIndent++;
   }
 
-  tmpFolder->pidlItem = COMDLG32_PIDL_ILClone(pidl); /* FIXME: memory leak*/
+  tmpFolder->pidlItem = COMDLG32_PIDL_ILClone(pidl);
 
   if(tmpFolder->m_iIndent > liInfos->iMaxIndentation)
     liInfos->iMaxIndentation = tmpFolder->m_iIndent;
@@ -2420,6 +2420,7 @@
     return iItemID;
   }
 
+  COMDLG32_SHFree( tmpFolder->pidlItem );
   MemFree( tmpFolder );
   return -1;
 
@@ -3034,3 +3035,5 @@
         HeapFree(GetProcessHeap(),0,mem);
     }
 }
+
+
Index: wine/dlls/commdlg/filedlgbrowser.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlgbrowser.c,v
retrieving revision 1.35
diff -d -u -r1.35 filedlgbrowser.c
--- wine/dlls/commdlg/filedlgbrowser.c	2 Jul 2002 02:05:17 -0000	1.35
+++ wine/dlls/commdlg/filedlgbrowser.c	14 Jul 2002 20:38:19 -0000
@@ -228,7 +228,7 @@
 
     if (!--(This->ref))
     {
-      HeapFree(GetProcessHeap(),0, This);
+      COMDLG32_SHFree(This);
       TRACE("-- destroyed\n");
       return 0;
     }
@@ -306,7 +306,10 @@
 
     ICOM_THIS(IShellBrowserImpl, iface);
 
-    TRACE("(%p)(%p,0x%08x)\n", This, pidl, wFlags);
+    TRACE("(%p)(pidl=%p,flags=0x%08x(%s))\n", This, pidl, wFlags,
+	(wFlags & SBSP_RELATIVE) ? "SBSP_RELATIVE" :
+	(wFlags & SBSP_PARENT) ? "SBSP_PARENT" :
+ 	(wFlags & SBSP_ABSOLUTE) ? "SBSP_ABSOLUTE" : "SBPS_????");
 
     fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux