summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-rebalance.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-12-19 09:45:42 +0530
committerAmar Tumballi <amarts@redhat.com>2018-12-20 06:26:37 +0000
commite1f92176a8d372e99386c0f007d6a38c0a54ca5b (patch)
tree4a84a104088b4e6d17a2d291230335abcdb23835 /xlators/cluster/dht/src/dht-rebalance.c
parent8cde14a537f0112400744d518ed196eb8fa232f2 (diff)
all: handle USE_AFTER_FREE warnings
* we shouldn't be using 'local' after DHT_STACK_UNWIND() as it frees the content of local. Add a 'goto out' or similar logic to handle the situation. * fix possible overlook of unref(dict), instead of unref(xdata). * make coverity happy by re-ordering unref in meta-defaults. * gfid-access: re-order dictionary allocation so we don't have to do a extra unref. * other obvious errors reported. updates: bz#789278 Change-Id: If05961ee946b0c4868df19861d7e4a927a2a2489 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-rebalance.c')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 187244435d6..46acc77c4b0 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -875,7 +875,7 @@ out:
dict_unref(dict);
if (xdata)
- dict_unref(dict);
+ dict_unref(xdata);
return ret;
}