From fba88360a8981936dc2fe445859a7b30e4775e72 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Mon, 9 Mar 2015 15:01:05 -0700 Subject: [PATCH] fcoll/dynamic: more coverity fixes Okay coverity seems to get one stuck in a loop where by fixing one set of resource allocation problems, it starts finding more. Signed-off-by: Howard Pritchard --- ompi/mca/fcoll/static/fcoll_static_file_write_all.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ompi/mca/fcoll/static/fcoll_static_file_write_all.c b/ompi/mca/fcoll/static/fcoll_static_file_write_all.c index 1300d68905..d03708d6fd 100644 --- a/ompi/mca/fcoll/static/fcoll_static_file_write_all.c +++ b/ompi/mca/fcoll/static/fcoll_static_file_write_all.c @@ -299,7 +299,8 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, sizeof(local_io_array)); if (NULL == global_iov_array){ opal_output (1, "OUT OF MEMORY\n"); - return OMPI_ERR_OUT_OF_RESOURCE; + ret = OMPI_ERR_OUT_OF_RESOURCE; + goto exit; } } @@ -328,7 +329,8 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, sorted = (int *)malloc (global_iov_count * sizeof(int)); if (NULL == sorted) { opal_output (1, "OUT OF MEMORY\n"); - return OMPI_ERR_OUT_OF_RESOURCE; + ret = OMPI_ERR_OUT_OF_RESOURCE; + goto exit; } local_heap_sort (global_iov_array, global_iov_count, sorted); }