diff options
author | Anand Avati <avati@gluster.com> | 2009-12-05 06:03:04 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-05 03:41:30 -0800 |
commit | d281971e5061d4a339b31340798d6f1dbff348be (patch) | |
tree | 4a6f4955c7b5e6f6e89c63df62cfc2610d75bcc8 | |
parent | 73ef824cbb8a468b70b57e503c98c226aed813a7 (diff) |
fuse: fix leak in fuse_getxattr and fuse_getattr
In fuse_getxattr, @finh was leaked in the case of posix ACL getxattr
request
In fuse_getattr, @state was leaked when fuse_loc_fill() failed
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 438 (Memory leak)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=438
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index eb09121e821..0710ebb9ba9 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -780,6 +780,7 @@ fuse_getattr (xlator_t *this, fuse_in_header_t *finh, void *msg) "%"PRIu64": GETATTR %"PRIu64" (%s) (fuse_loc_fill() returned NULL inode)", finh->unique, finh->nodeid, state->loc.path); send_fuse_err (this, finh, ENOENT); + free_state (state); return; } @@ -2605,6 +2606,7 @@ fuse_getxattr (xlator_t *this, fuse_in_header_t *finh, void *msg) #ifdef DISABLE_POSIX_ACL if (!strncmp (name, "system.", 7)) { send_fuse_err (this, finh, ENODATA); + FREE (finh); return; } #endif |