On Mon, Oct 15, 2001 at 04:59:44PM +0400, Alexander V. Lukyanov wrote:
> I have applied this patch. BTW, cls has a memory leak. Try:

I have fixed the leak, here is the relevant patch:

--- FileSetOutput.cc    2001/10/15 11:58:38
+++ FileSetOutput.cc    2001/10/15 14:14:10
@@ -586,6 +586,7 @@
 FileCopyPeerCLS::~FileCopyPeerCLS()
 {
    delete f;
+   delete args;
    Delete(list_info);
    SessionPool::Reuse(session);
    xfree(dir);
@@ -613,11 +614,12 @@
         int oldpos = pos;
         fso.pat = mask;
         FileSet *res = list_info->GetResult();
+        Delete(list_info);
+        list_info=0;
         fso.print(*res, this);
         fso.pat = 0;
+        delete res;
         pos = oldpos;
-        if(list_info) Delete(list_info);
-        list_info=0;
       }

       /* next: */

--
   Alexander.

Reply via email to