summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/dict.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c
index e9fc1222d16..7bc5d57b032 100644
--- a/libglusterfs/src/dict.c
+++ b/libglusterfs/src/dict.c
@@ -801,6 +801,8 @@ data_from_dynstr (char *value)
data_t *data = get_new_data ();
+ if (!data)
+ return NULL;
data->len = strlen (value) + 1;
data->data = value;
@@ -817,6 +819,8 @@ data_from_dynmstr (char *value)
data_t *data = get_new_data ();
+ if (!data)
+ return NULL;
data->len = strlen (value) + 1;
data->data = value;
data->is_stdalloc = 1;