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