summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSakshi Bansal <sabansal@redhat.com>2016-02-08 12:14:12 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-02-24 21:11:32 -0800
commitb7d01547dad88aeebc8cc2dbd68839885615bd66 (patch)
treea44c57d85cd6e18333aa5c36c4ef06cfb8561522
parent77245bcbf02754dec832ca34a9138bade2c9cfa3 (diff)
dht: cleanup dict and free memory in rename code path
Change-Id: I2458e18197bdf7565563a85e9021b5b2850c1825 BUG: 1303945 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13392 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-rename.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index 132068d43e2..80047264f0e 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -362,6 +362,7 @@ dht_rename_track_for_changelog (xlator_t *this, dict_t *xattr,
oldloc->name);
GF_FREE (info);
}
+
return ret;
}
@@ -1085,6 +1086,9 @@ dht_rename_create_links (call_frame_t *frame)
&local->loc2, 0, xattr_new);
dict_unref (xattr_new);
+ if (xattr)
+ dict_unref (xattr);
+
return 0;
}