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