summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/dht/src/dht-common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index fe97b728506..1c0cf682af8 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -2634,6 +2634,7 @@ dht_symlink (call_frame_t *frame, xlator_t *this,
xlator_t *subvol = NULL;
int op_errno = -1;
dht_local_t *local = NULL;
+ int ret = -1;
VALIDATE_OR_GOTO (frame, err);
@@ -2657,6 +2658,13 @@ dht_symlink (call_frame_t *frame, xlator_t *this,
goto err;
}
+ ret = loc_copy (&local->loc, loc);
+ if (ret == -1) {
+ gf_log (this->name, GF_LOG_TRACE, "Failed to copy loc");
+ op_errno = ENOMEM;
+ goto err;
+ }
+
gf_log (this->name, GF_LOG_TRACE,
"creating %s on %s", loc->path, subvol->name);