mirror of
https://github.com/libfuse/libfuse.git
synced 2024-11-23 04:04:31 +08:00
fix memory leak on thread creation failure...
This commit is contained in:
parent
ea21aafdb9
commit
a13323d10b
@ -1,3 +1,12 @@
|
||||
2007-05-24 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* lib: fix memory leak on thread creation failure in multithreaded
|
||||
event loop. Found by Chris AtLee
|
||||
|
||||
* Filesystems (e.g. sshfs) failed to exit if SIGHUP handler is
|
||||
SIG_IGN in the parent process. So install handler for SIGHUP even
|
||||
in this case. Reported by Tim Walberg
|
||||
|
||||
2007-05-21 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix Oops or error if a regular file is created with mknod(2) on
|
||||
|
@ -143,6 +143,8 @@ static int fuse_start_thread(struct fuse_mt *mt)
|
||||
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
|
||||
if (res != 0) {
|
||||
fprintf(stderr, "fuse: error creating thread: %s\n", strerror(res));
|
||||
free(w->buf);
|
||||
free(w);
|
||||
return -1;
|
||||
}
|
||||
list_add_worker(w, &mt->main);
|
||||
|
@ -36,7 +36,8 @@ static int set_one_signal_handler(int sig, void (*handler)(int))
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (old_sa.sa_handler == SIG_DFL &&
|
||||
if ((old_sa.sa_handler == SIG_DFL ||
|
||||
(sig == SIGHUP && old_sa.sa_handler == SIG_IGN)) &&
|
||||
sigaction(sig, &sa, NULL) == -1) {
|
||||
perror("fuse: cannot set signal handler");
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user