1
1

common/ompio: fix coverty warnings

this commmit fixes coverty warnings CID 1445198 and CID 1445197
For a reason that is a bit unclear to me, coverty only complained about the read
files, but the write operations had the same issue, so I fixed that within the
same commit as well.

Signed-off-by: Edgar Gabriel <egabriel@central.uh.edu>
Этот коммит содержится в:
Edgar Gabriel 2019-05-23 13:40:39 -05:00
родитель ad29f70c8a
Коммит 8eda9f2ecd
2 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -130,6 +130,10 @@ int mca_common_ompio_file_read (ompio_file_t *fh,
if ( MPI_STATUS_IGNORE != status ) {
status->_ucount = 0;
}
if (NULL != decoded_iov) {
free (decoded_iov);
decoded_iov = NULL;
}
return OMPI_SUCCESS;
}
@ -309,6 +313,11 @@ int mca_common_ompio_file_iread (ompio_file_t *fh,
ompio_req->req_ompi.req_status._ucount = 0;
ompi_request_complete (&ompio_req->req_ompi, false);
*request = (ompi_request_t *) ompio_req;
if (NULL != decoded_iov) {
free (decoded_iov);
decoded_iov = NULL;
}
return OMPI_SUCCESS;
}

Просмотреть файл

@ -115,6 +115,10 @@ int mca_common_ompio_file_write (ompio_file_t *fh,
if ( MPI_STATUS_IGNORE != status ) {
status->_ucount = 0;
}
if (NULL != decoded_iov) {
free (decoded_iov);
decoded_iov = NULL;
}
return OMPI_SUCCESS;
}
@ -288,6 +292,11 @@ int mca_common_ompio_file_iwrite (ompio_file_t *fh,
ompio_req->req_ompi.req_status._ucount = 0;
ompi_request_complete (&ompio_req->req_ompi, false);
*request = (ompi_request_t *) ompio_req;
if (NULL != decoded_iov) {
free (decoded_iov);
decoded_iov = NULL;
}
return OMPI_SUCCESS;
}