diff options
author | Sanju Rakonde <srakonde@redhat.com> | 2018-07-16 15:59:36 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-07-18 14:08:27 +0000 |
commit | a75a419d39cd2e2907bcc6eed5b9a4a30a8a3f4d (patch) | |
tree | 9e8a1a5b0a401306d76d189aefd801feaa674770 /xlators/cluster/afr/src/afr-transaction.c | |
parent | e4f6d887527a37eed34eea0fb9a3d68957a44e34 (diff) |
glusterd: memory leak in get-state
Problem: gluster get-state command is leaking the memory when
geo-replication session is configured.
Cause: In glusterd_print_gsync_status(), we are trying to get
reference to the keys of gsync_dict. The references to keys of
gsync_dict are stored status_vols[i]. status_vols[i] are
allocated with a memory of size of gf_gsync_status_t.
Solution: Need not to use a array of pointers(status_vals), using
a pointer to hold the reference to a key of gsync_dict is sufficient.
Followed the below steps for testing:
1. Configured geo-rep session
2. Ran gluster get-state command for 1000 times.
Without this patch, glusterd's memory was increasing significantly
(around 22000KB per 1000 times), with this patch it reduced (1500KB
per 1000 times)
fixes: bz#1601423
Change-Id: I361f5525d71f821bb345419ccfdc20ca288ca292
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
0 files changed, 0 insertions, 0 deletions