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