summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@redhat.com>2014-02-06 19:32:35 -0600
committerAnand Avati <avati@redhat.com>2014-02-08 11:22:32 -0800
commit104e8df41073036eb47583503035bad298bdbe87 (patch)
tree05e8145a894803ed704230b3846249abc149c4c6 /libglusterfs
parentff28179310c761a77210f1294cd2db70555fdad8 (diff)
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 <crh@redhat.com> Reviewed-on: http://review.gluster.org/6933 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/xlator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 9ce52407f9e..f3df8e2aeaf 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;