summaryrefslogtreecommitdiffstats
path: root/xlators/features/leases/src
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2017-02-22 16:40:12 +0100
committerJeff Darcy <jeff@pl.atyp.us>2017-05-05 18:50:20 +0000
commit1538b7296cc0a3150f33190f97dc99c9ca126322 (patch)
tree65185ce19eb4314afe8cdba93f5f344d9d13862e /xlators/features/leases/src
parentfe83a4ae84dd4345d6e958219d5a1dc59ecb039d (diff)
Fix ressources leak on error path
Coverty found a path where blk_fop is not freed, thus leaking memory. The main cause is because we are using the wrong variable for errors. I do not think this is leaking anything in practice, since the error condition seems quite rare, but fixing this should remove around 15 coverty warning. Change-Id: Ida0ea59f501f0a21bd1d8119aa1a299ce655add8 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16715 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/features/leases/src')
-rw-r--r--xlators/features/leases/src/leases.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/leases/src/leases.h b/xlators/features/leases/src/leases.h
index 443c6a22324..5dde1592fb5 100644
--- a/xlators/features/leases/src/leases.h
+++ b/xlators/features/leases/src/leases.h
@@ -119,7 +119,7 @@ do { \
gf_msg (this->name, GF_LOG_WARNING, ENOMEM, \
LEASE_MSG_NO_MEM, \
"Unable to create/get inode ctx"); \
- op_errno = ENOMEM; \
+ ret = -ENOMEM; \
goto __out; \
} \
\