diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2019-01-24 12:14:48 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-02-19 04:09:33 +0000 |
commit | eacc48b96b818ab2d15ed9d3a9a21818feed2826 (patch) | |
tree | ecfffd8f762d806319bf6c884678332f9855711c /xlators/performance/write-behind | |
parent | 8acca65e72f7724d23c18f44693a269d95a664c5 (diff) |
cli : fix mem leak during cli_cmd_volume_gsync_set_cbk
This patch fixes mem-leak due to excessive use of gf_asprintf
to form dynamic growing string.
Problem: each call to asprintf/vsprintf for extending existing string causes
a memory leak, because the blob at the original address of existing
string is not freed and a new location is generated by asprintf.
Tracebacks:
#2 0x7fdf191b8b3b in gf_vasprintf ../libglusterfs/src/mem-pool.c:236
#3 0x7fdf191b8d0a in gf_asprintf ../libglusterfs/src/mem-pool.c:256
#4 0x420cd3 in cli_cmd_volume_gsync_set_cbk ../cli/src/cli-cmd-volume.c:2576
SUMMARY: AddressSanitizer: 255 byte(s) leaked in 3 allocation(s).
....
SUMMARY: AddressSanitizer: 431 byte(s) leaked in 4 allocation(s).
....
SUMMARY: AddressSanitizer: 449 byte(s) leaked in 4 allocation(s).
....
SUMMARY: AddressSanitizer: 397 byte(s) leaked in 4 allocation(s).
....
SUMMARY: AddressSanitizer: 160 byte(s) leaked in 2 allocation(s).
....
updates: bz#1633930
Change-Id: I7e8902f0ed23e640dc17e3dcbdab7ae0579d2dc6
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/performance/write-behind')
0 files changed, 0 insertions, 0 deletions