From a7c746577249af6326907e280843e1f4c0231bb0 Mon Sep 17 00:00:00 2001 From: Sunny Kumar Date: Tue, 19 Mar 2019 22:51:14 +0530 Subject: 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 --- xlators/mount/fuse/src/fuse-bridge.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- cgit