summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/scheduler.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/scheduler.c')
-rw-r--r--libglusterfs/src/scheduler.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libglusterfs/src/scheduler.c b/libglusterfs/src/scheduler.c
index 0b5df51b3ed..f799b52fcf6 100644
--- a/libglusterfs/src/scheduler.c
+++ b/libglusterfs/src/scheduler.c
@@ -35,14 +35,19 @@ get_scheduler (xlator_t *xl, const char *name)
volume_opt_list_t *vol_opt = NULL;
char *sched_file = NULL;
void *handle = NULL;
-
+ int ret = 0;
+
if (name == NULL) {
gf_log ("scheduler", GF_LOG_ERROR,
"'name' not specified, EINVAL");
return NULL;
}
- asprintf (&sched_file, "%s/%s.so", SCHEDULERDIR, name);
+ ret = asprintf (&sched_file, "%s/%s.so", SCHEDULERDIR, name);
+ if (-1 == ret) {
+ gf_log ("scheduler", GF_LOG_ERROR, "asprintf failed");
+ return NULL;
+ }
gf_log ("scheduler", GF_LOG_DEBUG,
"attempt to load file %s.so", name);