diff options
| author | Sunny Kumar <sunkumar@redhat.com> | 2018-08-29 14:24:29 +0530 | 
|---|---|---|
| committer | Raghavendra G <rgowdapp@redhat.com> | 2018-08-30 03:12:51 +0000 | 
| commit | f29e46f97737d9e2d154ba0e99c5ffb1d03eaa57 (patch) | |
| tree | c35275da90b77589a58e9449a00762d15e3fd23b | |
| parent | cbe133c832fd9907619a1231aa3d9dda1330ae74 (diff) | |
IO cache : fix coverity issues in io-cache.c
This patch fixes CID 1382361, 1124714 and 1382432.
Change-Id: I0407f35ee44ec6e4522de46092658223d0c8ee6a
updates: bz#789278
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
| -rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index ef7f2ff216d..7156b426b04 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -189,7 +189,7 @@ ioc_inode_update (xlator_t *this, inode_t *inode, char *path,          LOCK (&inode->lock);          { -                __inode_ctx_get (inode, this, &tmp_ioc_inode); +                (void) __inode_ctx_get (inode, this, &tmp_ioc_inode);                  ioc_inode = (ioc_inode_t *)(long)tmp_ioc_inode;                  if (!ioc_inode) { @@ -198,8 +198,8 @@ ioc_inode_update (xlator_t *this, inode_t *inode, char *path,                          ioc_inode = ioc_inode_create (table, inode,                                                        weight); -                        __inode_ctx_put (inode, this, -                                         (uint64_t)(long)ioc_inode); +                       (void) __inode_ctx_put (inode, this, +                                       (uint64_t)(long)ioc_inode);                  }          }          UNLOCK (&inode->lock); @@ -300,6 +300,11 @@ ioc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,          return 0;  unwind: +        if (local != NULL) { +                loc_wipe (&local->file_loc); +                mem_put (local); +        } +          STACK_UNWIND_STRICT (lookup, frame, -1, op_errno, NULL, NULL,                               NULL, NULL);  | 
