summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/dict.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/dict.c')
-rw-r--r--libglusterfs/src/dict.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c
index c314a903b91..25ddff0d8c4 100644
--- a/libglusterfs/src/dict.c
+++ b/libglusterfs/src/dict.c
@@ -2727,6 +2727,11 @@ dict_unserialize (char *orig_buf, int32_t size, dict_t **fill)
goto out;
}
value = get_new_data ();
+
+ if (!value) {
+ ret = -1;
+ goto out;
+ }
value->len = vallen;
value->data = memdup (buf, vallen);
value->is_static = 0;