diff options
Diffstat (limited to 'libglusterfs/src/scheduler.c')
| -rw-r--r-- | libglusterfs/src/scheduler.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/libglusterfs/src/scheduler.c b/libglusterfs/src/scheduler.c index 459c7d868..94131676e 100644 --- a/libglusterfs/src/scheduler.c +++ b/libglusterfs/src/scheduler.c @@ -43,7 +43,7 @@ get_scheduler (xlator_t *xl, const char *name)  		return NULL;  	} -	ret = asprintf (&sched_file, "%s/%s.so", SCHEDULERDIR, name); +	ret = gf_asprintf (&sched_file, "%s/%s.so", SCHEDULERDIR, name);          if (-1 == ret) {                  gf_log ("scheduler", GF_LOG_ERROR, "asprintf failed");                  return NULL; @@ -66,7 +66,8 @@ get_scheduler (xlator_t *xl, const char *name)  		return NULL;  	} -	vol_opt = CALLOC (1, sizeof (volume_opt_list_t)); +	vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t), +                             gf_common_mt_volume_opt_list_t);  	vol_opt->given_opt = dlsym (handle, "options");  	if (vol_opt->given_opt == NULL) {  		gf_log ("scheduler", GF_LOG_DEBUG, @@ -80,6 +81,7 @@ get_scheduler (xlator_t *xl, const char *name)  			return NULL;  		}  	} +        GF_FREE(sched_file);  	return tmp_sched;  }  | 
