From 63192921703127e481fae6a1331f81acc495d83a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 24 Mar 2018 05:51:32 -0700 Subject: [PATCH] fcoll/static: fix CID 1413066 local_iov_array is unconditionally allocated, so unconditionally de-allocate it, too. Signed-off-by: Jeff Squyres --- ompi/mca/fcoll/static/fcoll_static_file_write_all.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 8e8e08c33c..07f57db211 100644 --- a/ompi/mca/fcoll/static/fcoll_static_file_write_all.c +++ b/ompi/mca/fcoll/static/fcoll_static_file_write_all.c @@ -975,12 +975,12 @@ exit: decoded_iov = NULL; } - if (my_aggregator == fh->f_rank) { + if (NULL != local_iov_array){ + free(local_iov_array); + local_iov_array = NULL; + } - if (NULL != local_iov_array){ - free(local_iov_array); - local_iov_array = NULL; - } + if (my_aggregator == fh->f_rank) { for(l=0;lf_procs_per_group;l++){ if (NULL != blocklen_per_process[l]){ free(blocklen_per_process[l]);