From 5e9347bfb4765824965ab206b86db8e9f6725423 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 22 May 2014 04:53:42 +0000 Subject: [PATCH] Fix deallocation error in mca_common_sm_rml_info_bcast() buffer is sent (num_local_procs-1) time, so it should be OBJ_RETAIN'ed (num_local_procs-2) time cmr=v1.8.2:reviewer=rhc This commit was SVN r31874. --- ompi/mca/common/sm/common_sm_rml.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ompi/mca/common/sm/common_sm_rml.c b/ompi/mca/common/sm/common_sm_rml.c index 82acf7405f..b650681d5a 100644 --- a/ompi/mca/common/sm/common_sm_rml.c +++ b/ompi/mca/common/sm/common_sm_rml.c @@ -107,6 +107,9 @@ mca_common_sm_rml_info_bcast(opal_shmem_ds_t *out_ds_buf, /* first num_local_procs items should be local procs */ for (p = 1; p < num_local_procs; ++p) { /* a potential future optimization: use non-blocking routines */ + if (p != (num_local_procs-1)) { + OBJ_RETAIN(buffer); + } tmprc = ompi_rte_send_buffer_nb(&(procs[p]->proc_name), buffer, tag, ompi_rte_send_cbfunc, NULL); if (0 > tmprc) {