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