diff options
| author | Sunny Kumar <sunkumar@redhat.com> | 2019-02-20 14:49:24 +0530 | 
|---|---|---|
| committer | Amar Tumballi <amarts@redhat.com> | 2019-02-25 07:06:13 +0000 | 
| commit | b2081cd8856a725c89c4d97b1399c589780b467a (patch) | |
| tree | c7bc49b417a508e30c027c442ee823b8bcd541fe /xlators/mount | |
| parent | 2236c8d3a1e9191d3505e6c1b14022a221aeeb7d (diff) | |
fuse : fix memory leak
This patch fixes memory leak reported by ASan.
Tracebacks:
ERROR: LeakSanitizer: detected memory leaks
Direct leak of 712 byte(s) in 1 object(s) allocated from:
    #0 0x7f35139dc848 in __interceptor_malloc (/lib64/libasan.so.5+0xef848)
    #1 0x7f35136efb29 in __gf_malloc ../libglusterfs/src/mem-pool.c:136
    #2 0x7f3510591ce9 in fuse_thread_proc ../xlators/mount/fuse/src/fuse-bridge.c:5929
    #3 0x7f351336d58d in start_thread (/lib64/libpthread.so.0+0x858d)
SUMMARY: AddressSanitizer: 712 byte(s) leaked in 1 allocation(s).
updates: bz#1633930
Change-Id: Ie5b4da6b338d8e5fc770c5b2da1238e3462468ac
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/mount')
| -rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index bd8bc114a32..492ce970ff2 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -6054,8 +6054,12 @@ fuse_thread_proc(void *data)      cont_err:          iobuf_unref(iobuf);          GF_FREE(iov_in[0].iov_base); +        iov_in[0].iov_base = NULL;      } +    if (iov_in[0].iov_base) +        GF_FREE(iov_in[0].iov_base); +      /*       * We could be in all sorts of states with respect to iobuf and iov_in       * by the time we get here, and it's just not worth untangling them if  | 
