summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-10-31 12:23:21 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-16 21:10:56 -0800
commit5aadd0765ba4c21b5ef626f7f8ca8ccff530dd2f (patch)
tree3c1bb07890681f5871b6742b4c3f419e5963d9c0 /libglusterfs
parent43a36decf24b126936bffda273c79e23f547004d (diff)
xlator: prevent a crash in xlator_destroy due to uninitialized list
was happening when any of the dlopen() fails for xlator loading, and xlator_destroy() was called as it was using a uninitialized list for traversal. now, the list gets initialized at the begining of the xl-init(), so xlator_destroy() works smoothly. Change-Id: I320f6fe922e6d351e6d7c0a3e8da1f6b414d3c47 BUG: 3731 Reviewed-on: http://review.gluster.com/606 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/xlator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 1e349b5..023cbc9 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -193,6 +193,8 @@ xlator_dynload (xlator_t *xl)
GF_VALIDATE_OR_GOTO ("xlator", xl, out);
+ INIT_LIST_HEAD (&xl->volume_options);
+
ret = gf_asprintf (&name, "%s/%s.so", XLATORDIR, xl->type);
if (-1 == ret) {
gf_log ("xlator", GF_LOG_ERROR, "asprintf failed");
@@ -256,8 +258,6 @@ xlator_dynload (xlator_t *xl)
dlerror());
}
- INIT_LIST_HEAD (&xl->volume_options);
-
vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t),
gf_common_mt_volume_opt_list_t);