Skip to content

Commit 0bdc594

Browse files
committed
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 <[email protected]>
1 parent 6f2ca58 commit 0bdc594

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

orte/mca/rml/base/rml_base_stubs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* reserved.
77
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
88
* Copyright (c) 2014-2016 Intel Corporation. All rights reserved.
9-
* Copyright (c) 2015-2016 Research Organization for Information Science
9+
* Copyright (c) 2015-2017 Research Organization for Information Science
1010
* and Technology (RIST). All rights reserved.
1111
* $COPYRIGHT$
1212
*
@@ -312,6 +312,10 @@ void orte_rml_API_recv_cancel(orte_process_name_t* peer, orte_rml_tag_t tag)
312312
"%s rml_recv_cancel for peer %s tag %d",
313313
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
314314
ORTE_NAME_PRINT(peer), tag);
315+
if (!orte_event_base_active) {
316+
/* no event will be processed any more, so simply return. */
317+
return;
318+
}
315319

316320
/* push the request into the event base so we can remove
317321
* the receive from our list of posted recvs */

0 commit comments

Comments
 (0)