Package: fam
Version: 2.7.0-10
Severity: normal
Tags: patch

Main use on my system is by courier-imap in order to provide fast
notification of new emails via IDLE command.  After a couple of months
running like this, famd uses about 2GB of memory.

The attached patch seems to have fixed this problem.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (700, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages fam depends on:
ii  libc6                         2.3.6-13   GNU C Library: Shared libraries
ii  libgcc1                       1:4.1.0-4  GCC support library
ii  libstdc++5                    1:3.3.4-11 The GNU Standard C++ Library v3
ii  portmap                       5-3        The RPC portmapper

fam recommends no packages.

-- debconf information:
  fam/init: inetd
diff -Naur fam-2.7.0/src/DNotify.c++ fam-2.7.0-fix-leak/src/DNotify.c++
--- fam-2.7.0/src/DNotify.c++   2006-08-04 20:20:01.000000000 +1000
+++ fam-2.7.0-fix-leak/src/DNotify.c++  2006-08-04 20:21:31.000000000 +1000
@@ -69,6 +69,12 @@
        n_dir_watches = 0;
     }
 
+    ~FileWatch(void) {
+        if (dir_watch) {
+            free(dir_watch);
+        }
+    }
+
     void add_dir_watch (DirWatch *w);
     bool has_dir_watch (DirWatch *w);
 };

Reply via email to