--- /tmp/fuse.c.2.4.2 2005-12-03 18:19:33.000000000 -0500 +++ /tmp/fuse.c.2.4.2.patched 2005-12-03 18:19:33.000000000 -0500 @@ -1656,6 +1656,7 @@ void fuse_process_cmd(struct fuse *f, struct fuse_cmd *cmd) { fuse_session_process(f->se, cmd->buf, cmd->buflen, cmd->ch); + free_cmd(cmd); } int fuse_exited(struct fuse *f) @@ -1693,6 +1694,8 @@ int res = fuse_chan_receive(ch, cmd->buf, bufsize); if (res <= 0) { free_cmd(cmd); + if (res == -1) + fuse_exit(f); return NULL; } cmd->buflen = res;