Skip to content

Commit b7b0a4f

Browse files
committed
fbtl/posix: fix for CID 1645304
initialize AIO elements to zero by using calloc Signed-off-by: Edgar Gabriel <[email protected]>
1 parent eaf07b8 commit b7b0a4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ ssize_t mca_fbtl_posix_ipreadv (ompio_file_t *fh,
5656
data->prd_req_type = FBTL_POSIX_AIO_READ;
5757
data->prd_req_chunks = ompi_fbtl_posix_max_prd_active_reqs;
5858
data->prd_total_len = 0;
59-
data->prd_aio.aio_reqs = (struct aiocb *) malloc (sizeof(struct aiocb) *
60-
fh->f_num_of_io_entries);
59+
data->prd_aio.aio_reqs = (struct aiocb *) calloc (fh->f_num_of_io_entries,
60+
sizeof(struct aiocb));
6161
if (NULL == data->prd_aio.aio_reqs) {
6262
opal_output(1, "mca_fbtl_posix_ipreadv: could not allocate memory\n");
6363
free(data);

0 commit comments

Comments
 (0)