summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 5c3d37ad104..0c249f0e84c 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -1158,7 +1158,9 @@ dht_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name)
return 0;
err:
- loc_wipe (child);
+ if (child) {
+ loc_wipe (child);
+ }
return -1;
}