[dm-devel] [PATCH] multipathd: fix waiter_attr resource leak

zhang.kai16 at zte.com.cn zhang.kai16 at zte.com.cn
Wed Jul 6 08:08:04 UTC 2016


As a global variable waiter_attr of thread attribute was set up in the 
daemon, 
however,it hasn't been destroyed when the daemon exited.
We need deinitialize waiter_attr.
 

---
 multipathd/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/multipathd/main.c b/multipathd/main.c
index b86374f..09c5485 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2317,6 +2317,9 @@ child (void * param)
                 conf = NULL;
                 udev_unref(udev);
                 udev = NULL;
+
+                pthread_attr_destroy(&waiter_attr);
+
 #ifdef _DEBUG_
                 dbg_free_final(NULL);
 #endif
-- 
1.9.1


--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160706/cfa7a7a8/attachment.htm>


More information about the dm-devel mailing list