190130
From 3ac3312d63b9dc3c15cd8765ab8b7c601b007500 Mon Sep 17 00:00:00 2001
190130
From: Sunny Kumar <sunkumar@redhat.com>
190130
Date: Tue, 19 Mar 2019 22:51:14 +0530
190130
Subject: [PATCH 443/449] fuse : fix high sev coverity issue
190130
190130
This patch fixed coverity issue in fuse-bridge.c.
190130
190130
CID : 1398630 : Resource leak
190130
CID : 1399757 : Uninitialized pointer read
190130
190130
Upstream patch https://review.gluster.org/c/glusterfs/+/22382
190130
> updates: bz#789278
190130
>
190130
> Change-Id: I69f8591400ee56a5d215eeac443a8e3d7777db27
190130
> Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
190130
190130
BUG: 1787310
190130
Change-Id: Ib2c9af25019ee57131b3d384fc4b557437e75d3e
190130
Signed-off-by: Csaba Henk <csaba@redhat.com>
190130
Reviewed-on: https://code.engineering.redhat.com/gerrit/202759
190130
Tested-by: RHGS Build Bot <nigelb@redhat.com>
190130
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
190130
---
190130
 xlators/mount/fuse/src/fuse-bridge.c | 8 +++++++-
190130
 1 file changed, 7 insertions(+), 1 deletion(-)
190130
190130
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
190130
index cfad2b4..d17320b 100644
190130
--- a/xlators/mount/fuse/src/fuse-bridge.c
190130
+++ b/xlators/mount/fuse/src/fuse-bridge.c
190130
@@ -4174,6 +4174,7 @@ fuse_setxattr(xlator_t *this, fuse_in_header_t *finh, void *msg,
190130
     if (ret < 0) {
190130
         op_errno = -ret;
190130
         GF_FREE(dict_value);
190130
+        GF_FREE(newkey);
190130
         goto done;
190130
     }
190130
 
190130
@@ -5963,7 +5964,12 @@ fuse_thread_proc(void *data)
190130
     ssize_t res = 0;
190130
     struct iobuf *iobuf = NULL;
190130
     fuse_in_header_t *finh = NULL;
190130
-    struct iovec iov_in[2];
190130
+    struct iovec iov_in[2] = {
190130
+        {
190130
+            0,
190130
+        },
190130
+    };
190130
+
190130
     void *msg = NULL;
190130
     /* we need 512 extra buffer size for BATCH_FORGET fop. By tests, it is
190130
        found to be reduces 'REALLOC()' in the loop */
190130
-- 
190130
1.8.3.1
190130