cleanup
authorMiklos Szeredi <miklos@szeredi.hu>
Fri, 16 Jul 2004 18:27:50 +0000 (18:27 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Fri, 16 Jul 2004 18:27:50 +0000 (18:27 +0000)
ChangeLog
lib/fuse_mt.c
lib/helper.c

index 55769c8fce0d5d34d17925557558b95b5872eec2..dc31a7030857cb8a2e8a48e795a86eafa1f4b29d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@
        fuse_commit_write(), clear the dirty flag and set the uptodate
        flag for that page
 
+       * Some memory cleanup at exit
+
 2004-07-13  Miklos Szeredi <miklos@szeredi.hu>
 
        * Add FUSE_HARD_REMOVE flag, and '-i' option to fuse main, which
index 89c0fc80da16f44ff8589e87cab2ffeedc840b1a..71196a9d1244683ee0cb50c79698a7b339495ee7 100644 (file)
@@ -125,6 +125,8 @@ void __fuse_loop_mt(struct fuse *f, fuse_processor_t proc, void *data)
     for (i = 1; i < f->numworker; i++)
         pthread_cancel(w->threads[i]);
     pthread_mutex_unlock(&f->lock);
+    pthread_key_delete(f->context_key);
+    free(w);
 }
 
 void fuse_loop_mt(struct fuse *f)
index d597c468cf0ad7c1f0609642a88c0fd4d28e8876..76b6eb75e4099af4a1b29075e2141cd5d59dffda 100644 (file)
@@ -56,6 +56,7 @@ static void set_one_signal_handler(int signal, void (*handler)(int))
     struct sigaction sa;
     struct sigaction old_sa;
 
+    memset(&sa, 0, sizeof(struct sigaction));
     sa.sa_handler = handler;
     sigemptyset(&(sa.sa_mask));
     sa.sa_flags = 0;