projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Missing memset and free-on-error in io engines
[fio.git]
/
engines
/
fio-engine-posixaio.c
diff --git
a/engines/fio-engine-posixaio.c
b/engines/fio-engine-posixaio.c
index 401cd866ba549ee193098f3af54998c6e6aef2fd..894a410a459117571518c00b66abe2d790a81183 100644
(file)
--- a/
engines/fio-engine-posixaio.c
+++ b/
engines/fio-engine-posixaio.c
@@
-171,7
+171,9
@@
static int fio_posixaio_init(struct thread_data *td)
{
struct posixaio_data *pd = malloc(sizeof(*pd));
{
struct posixaio_data *pd = malloc(sizeof(*pd));
+ memset(pd, 0, sizeof(*pd));
pd->aio_events = malloc(td->iodepth * sizeof(struct io_u *));
pd->aio_events = malloc(td->iodepth * sizeof(struct io_u *));
+ memset(pd->aio_events, 0, td->iodepth * sizeof(struct io_u *));
td->io_ops->data = pd;
return 0;
td->io_ops->data = pd;
return 0;