summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurabhi <sbhaloth@redhat.com>2014-01-27 14:09:10 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-04 10:00:13 -0800
commit7282094c5f387d7be1a353c7ed19c8e4a1e49eec (patch)
treeeb633a0f1989a18a09e2411a1613b8a9833f68ee
parent0c721c4c046d3580f7774eb480ff139c3ef814b5 (diff)
libglusterfs:Fixing Dereference NULL return value.
1.Checking of data for NULL. Change-Id: If49513f7c3fd1dc443c05dc62ed07d3254059e6e BUG: 789278 Signed-off-by: surabhi <sbhaloth@redhat.com> Reviewed-on: http://review.gluster.org/6799 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-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;