summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-07-25 14:45:12 +0530
committerAnand Avati <avati@gluster.com>2011-08-01 03:38:45 -0700
commit09ed0531bd882726e2965d2274d5c9171998f9c8 (patch)
tree97f831dbb5f60447724a2579f587a853dc94249d
parent418ac2c8b7456e3299b5b9b96b532053e37ca3d6 (diff)
storage/posix: handle dictionary being NULL in a function
Change-Id: Ib9cac6ed1635203802f089986f8acb1ce416265d BUG: 3215 Reviewed-on: http://review.gluster.com/97 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c2
-rw-r--r--xlators/storage/posix/src/posix.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index ddd043d..d9f2b8b 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -346,7 +346,7 @@ dht_selfheal_dir_mkdir (call_frame_t *frame, loc_t *loc,
}
if (!dict)
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_WARNING,
"dict is NULL, need to make sure gfid's are same");
for (i = 0; i < layout->cnt; i++) {
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index b3ed23a..785d16e 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -516,6 +516,9 @@ posix_entry_create_xattr_set (xlator_t *this, const char *path,
data_pair_t *trav = NULL;
int ret = -1;
+ if (!dict)
+ goto out;
+
trav = dict->members_list;
while (trav) {
if (!strcmp (GFID_XATTR_KEY, trav->key) ||