From 0bdc594b2e5b7c11bbbe376d28e599e1106e0641 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 23 Jan 2017 16:54:01 +0900 Subject: [PATCH] rml/base: plug a memory leak in orte_rml_API_recv_cancel() simply return when the orte event thread has gone Signed-off-by: Gilles Gouaillardet --- orte/mca/rml/base/rml_base_stubs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/orte/mca/rml/base/rml_base_stubs.c b/orte/mca/rml/base/rml_base_stubs.c index aaf61500ba..9197e10423 100644 --- a/orte/mca/rml/base/rml_base_stubs.c +++ b/orte/mca/rml/base/rml_base_stubs.c @@ -6,7 +6,7 @@ * reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014-2016 Intel Corporation. All rights reserved. - * Copyright (c) 2015-2016 Research Organization for Information Science + * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -312,6 +312,10 @@ void orte_rml_API_recv_cancel(orte_process_name_t* peer, orte_rml_tag_t tag) "%s rml_recv_cancel for peer %s tag %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(peer), tag); + if (!orte_event_base_active) { + /* no event will be processed any more, so simply return. */ + return; + } /* push the request into the event base so we can remove * the receive from our list of posted recvs */