summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-hashfn.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-hashfn.c')
-rw-r--r--xlators/cluster/dht/src/dht-hashfn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-hashfn.c b/xlators/cluster/dht/src/dht-hashfn.c
index 1dfe2a7..acda67c 100644
--- a/xlators/cluster/dht/src/dht-hashfn.c
+++ b/xlators/cluster/dht/src/dht-hashfn.c
@@ -78,6 +78,9 @@ dht_hash_compute(xlator_t *this, int type, const char *name, uint32_t *hash_p)
priv = this->private;
+ if (name == NULL)
+ return -1;
+
len = strlen(name) + 1;
rsync_friendly_name = alloca(len);