14f8ab
From 3943fce5818a353117fc1c492e6383434d742979 Mon Sep 17 00:00:00 2001
14f8ab
From: Barak Sason <bsasonro@redhat.com>
14f8ab
Date: Sun, 18 Aug 2019 17:52:04 +0300
14f8ab
Subject: [PATCH 427/449] storage/posix - Fixing a coverity issue
14f8ab
14f8ab
Fixed a resource leak of variable 'pfd'
14f8ab
14f8ab
backport of https://review.gluster.org/#/c/glusterfs/+/23261/
14f8ab
>CID: 1400673
14f8ab
>Updates: bz#789278
14f8ab
>Change-Id: I78e1e8a89e0604b56e35a75c25d436b35db096c3
14f8ab
>Signed-off-by: Barak Sason <bsasonro@redhat.com>
14f8ab
14f8ab
BUG: 1787310
14f8ab
Change-Id: I78e1e8a89e0604b56e35a75c25d436b35db096c3
14f8ab
Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/202563
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
14f8ab
---
14f8ab
 xlators/storage/posix/src/posix-inode-fd-ops.c | 1 +
14f8ab
 1 file changed, 1 insertion(+)
14f8ab
14f8ab
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
14f8ab
index bcce06e..5748b9f 100644
14f8ab
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
14f8ab
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
14f8ab
@@ -1603,6 +1603,7 @@ posix_open(call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
14f8ab
         if (op_ret == -1) {
14f8ab
             gf_msg(this->name, GF_LOG_ERROR, errno, P_MSG_FSTAT_FAILED,
14f8ab
                    "pre-operation fstat failed on fd=%p", fd);
14f8ab
+            GF_FREE(pfd);
14f8ab
             goto out;
14f8ab
         }
14f8ab
 
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab