Skip to content

btl/tcp: fix double list remove #2077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions opal/mca/btl/tcp/btl_tcp_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static int mca_btl_tcp_component_open(void)

static int mca_btl_tcp_component_close(void)
{
opal_list_item_t *item;
mca_btl_tcp_event_t *event, *next;

#if MCA_BTL_TCP_SUPPORT_PROGRESS_THREAD
/**
Expand Down Expand Up @@ -454,8 +454,7 @@ static int mca_btl_tcp_component_close(void)

/* remove all pending events. Do not lock the tcp_events list as
the event themselves will unregister during the destructor. */
while( NULL != (item = opal_list_remove_first(&mca_btl_tcp_component.tcp_events)) ) {
mca_btl_tcp_event_t* event = (mca_btl_tcp_event_t*)item;
OPAL_LIST_FOREACH_SAFE(event, next, &mca_btl_tcp_component.tcp_events, mca_btl_tcp_event_t) {
opal_event_del(&event->event);
OBJ_RELEASE(event);
}
Expand Down