diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2019-03-19 22:51:14 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-03-21 09:07:50 +0000 |
commit | a7c746577249af6326907e280843e1f4c0231bb0 (patch) | |
tree | ef6c2113cd6d48247c8e7c61cf30aa7bee6743a5 /xlators/mount | |
parent | 8aff9cc5c6277ef7dacfb89f1392b7c2eda9b825 (diff) |
fuse : fix high sev coverity issue
This patch fixed coverity issue in fuse-bridge.c.
CID : 1398630 : Resource leak
CID : 1399757 : Uninitialized pointer read
updates: bz#789278
Change-Id: I69f8591400ee56a5d215eeac443a8e3d7777db27
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 04e814e297d..e14d0b996da 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -4056,6 +4056,7 @@ fuse_setxattr(xlator_t *this, fuse_in_header_t *finh, void *msg, if (ret < 0) { op_errno = -ret; GF_FREE(dict_value); + GF_FREE(newkey); goto done; } @@ -5848,7 +5849,12 @@ fuse_thread_proc(void *data) ssize_t res = 0; struct iobuf *iobuf = NULL; fuse_in_header_t *finh = NULL; - struct iovec iov_in[2]; + struct iovec iov_in[2] = { + { + 0, + }, + }; + void *msg = NULL; size_t msg0_size = sizeof(*finh) + sizeof(struct fuse_write_in); fuse_async_t *fasync; |