summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 30057b5dbec..7fd4478800f 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -315,6 +315,9 @@ gf_remember_xlator_option (struct list_head *options, char *arg)
option = GF_CALLOC (1, sizeof (xlator_cmdline_option_t),
gfd_mt_xlator_cmdline_option_t);
+ if (!option)
+ goto out;
+
INIT_LIST_HEAD (&option->cmd_args);
dot = strchr (arg, '.');
@@ -331,6 +334,9 @@ gf_remember_xlator_option (struct list_head *options, char *arg)
option->key = GF_CALLOC ((equals - dot) + 1, sizeof (char),
gfd_mt_char);
+ if (!option->key)
+ goto out;
+
strncpy (option->key, dot + 1, (equals - dot - 1));
if (!*(equals + 1))