diff options
| -rw-r--r-- | xlators/storage/posix/src/posix-aio.c | 6 | ||||
| -rw-r--r-- | xlators/storage/posix/src/posix-inode-fd-ops.c | 7 | 
2 files changed, 13 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-aio.c b/xlators/storage/posix/src/posix-aio.c index cf570d5be41..df32ffdd5c2 100644 --- a/xlators/storage/posix/src/posix-aio.c +++ b/xlators/storage/posix/src/posix-aio.c @@ -266,6 +266,12 @@ posix_aio_writev_complete(struct posix_aio_cb *paiocb, int res, int res2)      struct posix_private *priv = NULL;      fd_t *fd = NULL; +    if (!paiocb) { +        op_ret = -1; +        op_errno = EINVAL; +        goto out; +    } +      frame = paiocb->frame;      this = frame->this;      priv = this->private; diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index 2f541ba13b3..8906584684d 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -2709,6 +2709,13 @@ posix_links_in_same_directory(char *dirpath, int count, inode_t *leaf_inode,                             entry->d_name);              gf_entry = gf_dirent_for_name(entry->d_name); +            if (!gf_entry) { +                gf_msg(this->name, GF_LOG_ERROR, ENOMEM, 0, "gf_entry is NULL"); +                op_ret = -1; +                *op_errno = ENOMEM; +                inode_unref(loc.inode); +                goto out; +            }              gf_entry->inode = inode_ref(leaf_inode);              gf_entry->dict = posix_xattr_fill(this, temppath, &loc, NULL, -1,                                                xdata, NULL);  | 
