diff options
author | Akarsha Rai <akrai@redhat.com> | 2017-09-26 06:09:28 -0400 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-09-29 15:09:36 +0000 |
commit | 687908a364efcfb5ed69ff3dd0a8ef5b1551e88e (patch) | |
tree | bfab7da9a922fc99466d98943b83e35141724b22 /xlators/cluster | |
parent | e994fbc825b0ce48bbe0c23d034e821502359912 (diff) |
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 <akrai@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/ec/src/ec-helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |