diff options
| author | Ravishankar N <ravishankar@redhat.com> | 2016-08-23 12:51:57 +0530 |
|---|---|---|
| committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-08-24 14:51:47 -0700 |
| commit | bf86f46151ab93354469298560aa2bca467fdce3 (patch) | |
| tree | 4463db9b58412515cbc74917da1985dcfaf2e9ec /xlators/features/arbiter/src/arbiter.h | |
| parent | c88065772c1b5c3e3a6f7b172c3471ad056d3b13 (diff) | |
arbiter: Fix memleak in arbiter_inode ctx
Backport of: http://review.gluster.org/#/c/15289/
Problem:
The iattbuf ptr stored in arbiter's inode context was not freed during inode
forget.
Fix:
Change it to a statically allocated value so that we don't have to deal
with allocating/freeing it.
Change-Id: Id1b73b8aee1fb5c4174d0734bd20e168432b1abd
BUG: 1369752
Reported-by: Benjamin Edgar <benedgar8@gmail.com>
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit 4aa52061a51b97c4f865b402f977b3b43f5471a7)
Reviewed-on: http://review.gluster.org/15307
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/features/arbiter/src/arbiter.h')
| -rw-r--r-- | xlators/features/arbiter/src/arbiter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/arbiter/src/arbiter.h b/xlators/features/arbiter/src/arbiter.h index 69ce9cb4fa3..58814d36e62 100644 --- a/xlators/features/arbiter/src/arbiter.h +++ b/xlators/features/arbiter/src/arbiter.h @@ -16,11 +16,12 @@ #include "config.h" #endif +#include "xlator.h" #include "locking.h" #include "common-utils.h" typedef struct arbiter_inode_ctx_ { - struct iatt *iattbuf; + struct iatt iattbuf; } arbiter_inode_ctx_t; #endif /* _ARBITER_H */ |
