From 687908a364efcfb5ed69ff3dd0a8ef5b1551e88e Mon Sep 17 00:00:00 2001 From: Akarsha Rai Date: Tue, 26 Sep 2017 06:09:28 -0400 Subject: cluster/ec: FORWARD_NULL coverity fix Problem: ctx pointer could be NULL Solution: Updated the code to verify ctx pointer BUG: 789278 Change-Id: I25e07a07c6ebe2f630c99ba3aa9a61656fbaa981 Signed-off-by: Akarsha Rai --- xlators/cluster/ec/src/ec-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/ec') diff --git a/xlators/cluster/ec/src/ec-helpers.c b/xlators/cluster/ec/src/ec-helpers.c index 64b010fc480..c998462655f 100644 --- a/xlators/cluster/ec/src/ec-helpers.c +++ b/xlators/cluster/ec/src/ec-helpers.c @@ -776,7 +776,7 @@ ec_fd_t * __ec_fd_get(fd_t * fd, xlator_t * xl) } /* Treat anonymous fd specially */ - if (fd->anonymous) { + if (fd->anonymous && ctx) { /* Mark the fd open for all subvolumes. */ ctx->open = -1; /* Try to populate ctx->loc with fd->inode information. */ -- cgit