Correct double free of event on tcp_events list. Refs trac:1629.
This commit was SVN r19890. The following Trac tickets were found above: Ticket 1629 --> https://svn.open-mpi.org/trac/ompi/ticket/1629
Этот коммит содержится в:
родитель
6db5737779
Коммит
b5a30af20e
@ -10,6 +10,7 @@
|
|||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2007 Cisco, Inc. All rights reserved.
|
* Copyright (c) 2007 Cisco, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -269,6 +270,7 @@ int mca_btl_tcp_component_open(void)
|
|||||||
int mca_btl_tcp_component_close(void)
|
int mca_btl_tcp_component_close(void)
|
||||||
{
|
{
|
||||||
opal_list_item_t* item;
|
opal_list_item_t* item;
|
||||||
|
opal_list_item_t* next;
|
||||||
|
|
||||||
if(NULL != mca_btl_tcp_component.tcp_if_include)
|
if(NULL != mca_btl_tcp_component.tcp_if_include)
|
||||||
free(mca_btl_tcp_component.tcp_if_include);
|
free(mca_btl_tcp_component.tcp_if_include);
|
||||||
@ -290,12 +292,14 @@ int mca_btl_tcp_component_close(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* cleanup any pending events */
|
/* cleanup any pending events */
|
||||||
OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock);
|
OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock);
|
||||||
for(item = opal_list_remove_first(&mca_btl_tcp_component.tcp_events);
|
for(item = opal_list_get_first(&mca_btl_tcp_component.tcp_events);
|
||||||
item != NULL;
|
item != opal_list_get_end(&mca_btl_tcp_component.tcp_events);
|
||||||
item = opal_list_remove_first(&mca_btl_tcp_component.tcp_events)) {
|
item = next) {
|
||||||
mca_btl_tcp_event_t* event = (mca_btl_tcp_event_t*)item;
|
mca_btl_tcp_event_t* event = (mca_btl_tcp_event_t*)item;
|
||||||
|
next = opal_list_get_next(item);
|
||||||
opal_event_del(&event->event);
|
opal_event_del(&event->event);
|
||||||
OBJ_RELEASE(event);
|
OBJ_RELEASE(event);
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user