summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-aio.c
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2018-11-13 12:13:03 +0530
committerAmar Tumballi <amarts@redhat.com>2018-11-14 18:48:26 +0000
commit4c17065a02fb32acda32aac64da93ea5d326a7d5 (patch)
tree27038e49b7d9b23e7f94a100d163bb9ad1534d4a /xlators/storage/posix/src/posix-aio.c
parent3e20df8674d489fba707079e2b5a58347a3b3928 (diff)
posix: Fix null pointer dererfence
CID: 1124799 1214618 Change-Id: Iff05180983fe9600be0a2ce015a137e4efb8f533 updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-aio.c')
-rw-r--r--xlators/storage/posix/src/posix-aio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-aio.c b/xlators/storage/posix/src/posix-aio.c
index cf570d5..df32ffd 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;