diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2020-06-01 15:32:23 +0300 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2020-06-01 15:42:18 +0300 |
commit | 6ac77f85255c198fe08ed34b238a308d9428ac6d (patch) | |
tree | 7f73fc00322f57b0772f58404a3ffdf7a109305c /xlators | |
parent | 7b7559733ca0c25c63f9d56cb7f4650dbd694c40 (diff) |
afr: fix memory leak in afr_priv_destroy()
Found with GCC ASan:
Direct leak of 202 byte(s) in 2 object(s) allocated from:
#0 0x7fc6c6ef0667 in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb0667)
#1 0x7fc6c6bd145b in __gf_malloc /path/to/glusterfs/libglusterfs/src/mem-pool.c:175
#2 0x7fc6c6bd17a3 in gf_vasprintf /path/to/glusterfs/libglusterfs/src/mem-pool.c:223
#3 0x7fc6c6bd1993 in gf_asprintf /path/to/glusterfs/libglusterfs/src/mem-pool.c:243
#4 0x7fc6b0dc92f6 in init /path/to/glusterfs/xlators/cluster/afr/src/afr.c:590
...
Change-Id: I29feb1d30a045fb70472758e6ed4e195888090b2
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Fixes: #1278
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index ab4acc13625..99dd7ecd708 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -6599,6 +6599,8 @@ afr_priv_destroy(afr_private_t *priv) if (!priv) goto out; + + GF_FREE(priv->sh_domain); GF_FREE(priv->last_event); child_count = priv->child_count; |