master - dmeventd: Fix memory leak
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5ca54c4f0b27125bc385d55ea0b44853fc7744dd Commit: 5ca54c4f0b27125bc385d55ea0b44853fc7744dd Parent: 7db95d0d40c3608b7298cb19380430613fa9e532 Author: Jonathan Brassow <[email protected]> AuthorDate: Wed Jul 31 15:23:13 2013 -0500 Committer: Jonathan Brassow <[email protected]> CommitterDate: Wed Jul 31 15:23:13 2013 -0500
dmeventd: Fix memory leak
When creating a timeout thread for snapshots, the thread is not tracked and thus never joined. This means that the exit status of the timeout thread is held indefinitely. Saves a bit of memory to set PTHREAD_CREATE_DETACHED when creating this thread.
I've also added pthread_attr_init|destroy to setup the creation pthread_attr_t.
Reported-by NeilBrown <[email protected]>
Signed-off-by Jonathan Brassow <[email protected]>
--- WHATS_NEW | 1 + daemons/dmeventd/dmeventd.c | 41 +++++++++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 8 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.100 - ================================ + Create dmeventd timeout threads as "detached" so exit status is freed. Add initial support thin pool lvconvert --repair. Add --with-thin-repair and --with-thin-dump configure options. Add lvm.conf thin_repair/dump_executable and thin_repair_options.
daemons/dmeventd/dmeventd.c +33 -8
61 lines not on this page · raw message