From 104e8df41073036eb47583503035bad298bdbe87 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Thu, 6 Feb 2014 19:32:35 -0600 Subject: libglusterfs..xlator.c: Close a library handle. Simple fix to ensure that a library handle is closed if it is not actually used. BUG: 789278 CID: 1124783 Change-Id: Ia3e734c46e1ad8c97cb8cc7f1a5616606bfbc550 Signed-off-by: Christopher R. Hertel Reviewed-on: http://review.gluster.org/6933 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/xlator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 9ce52407f..f3df8e2ae 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -149,10 +149,13 @@ xlator_volopt_dynload (char *xlator_type, void **dl_handle, } *dl_handle = handle; + handle = NULL; ret = 0; out: GF_FREE (name); + if (handle) + dlclose (handle); gf_log ("xlator", GF_LOG_DEBUG, "Returning %d", ret); return ret; -- cgit