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