1
1

A bunch of minor ORTE valgrind-inspired memory leak cleanups (reviewed

by Ralph).

This commit was SVN r20544.
Этот коммит содержится в:
Jeff Squyres 2009-02-13 04:14:10 +00:00
родитель 8b29e27ead
Коммит 91d302fd67
6 изменённых файлов: 40 добавлений и 5 удалений

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -49,6 +50,7 @@ orte_ess_base_close(void)
}
OBJ_DESTRUCT(&orte_ess_base_components_available);
opal_output_close(orte_ess_base_output);
return ORTE_SUCCESS;
}

Просмотреть файл

@ -11,6 +11,7 @@
* All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -287,6 +288,7 @@ int mca_oob_tcp_component_open(void)
listen_type);
return ORTE_ERROR;
}
free(listen_type);
mca_base_param_reg_int(&mca_oob_tcp_component.super.oob_base,
"listen_thread_max_queue",
@ -401,6 +403,8 @@ int mca_oob_tcp_component_close(void)
OBJ_DESTRUCT(&mca_oob_tcp_component.tcp_peers);
OBJ_DESTRUCT(&mca_oob_tcp_component.tcp_peer_list);
opal_output_close(mca_oob_tcp_output_handle);
return ORTE_SUCCESS;
}
@ -1224,14 +1228,16 @@ mca_oob_t* mca_oob_tcp_component_init(int* priority)
&dev->super);
}
if (found_local && found_nonlocal) {
opal_list_item_t *item;
opal_list_item_t *item, *next;
for (item = opal_list_get_first(&mca_oob_tcp_component.tcp_available_devices) ;
item != opal_list_get_end(&mca_oob_tcp_component.tcp_available_devices) ;
item = opal_list_get_next(item)) {
item = next) {
mca_oob_tcp_device_t *dev = (mca_oob_tcp_device_t*) item;
next = opal_list_get_next(item);
if (dev->if_local) {
item = opal_list_remove_item(&mca_oob_tcp_component.tcp_available_devices,
item);
OBJ_RELEASE(dev);
}
}
}

Просмотреть файл

@ -11,6 +11,7 @@
* All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -118,6 +119,9 @@ static void mca_oob_tcp_peer_destruct(mca_oob_tcp_peer_t * peer)
mca_oob_tcp_peer_shutdown(peer);
OBJ_DESTRUCT(&(peer->peer_send_queue));
OBJ_DESTRUCT(&(peer->peer_lock));
if (NULL != peer->peer_addr) {
OBJ_RELEASE(peer->peer_addr);
}
}
/*

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -63,6 +64,17 @@ int orte_finalize(void)
/* cleanup the process info */
orte_proc_info_finalize();
/* Free some MCA param strings */
if (NULL != orte_launch_agent) {
free(orte_launch_agent);
}
if (NULL != orte_rsh_agent) {
free(orte_rsh_agent);
}
/* Close the general debug stream */
opal_output_close(orte_debug_output);
/* finalize the opal utilities */
opal_finalize();

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$
*
@ -69,7 +69,7 @@ char **orte_launch_environ;
bool orte_hnp_is_allocated = false;
bool orte_allocation_required;
char *orte_launch_agent;
char *orte_launch_agent = NULL;
char **orted_cmd_line=NULL;
orte_job_t *orte_debugger_daemon=NULL;
@ -120,7 +120,7 @@ char *orte_xterm;
bool orte_forward_job_control;
/* rsh support */
char *orte_rsh_agent;
char *orte_rsh_agent = NULL;
#endif /* !ORTE_DISABLE_FULL_RTE */

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -188,6 +189,16 @@ int orte_proc_info_finalize(void)
orte_process_info.sock_stderr = NULL;
}
if (NULL != orte_process_info.my_hnp_uri) {
free(orte_process_info.my_hnp_uri);
orte_process_info.my_hnp_uri = NULL;
}
if (NULL != orte_process_info.my_daemon_uri) {
free(orte_process_info.my_daemon_uri);
orte_process_info.my_daemon_uri = NULL;
}
orte_process_info.hnp = false;
orte_process_info.singleton = false;
orte_process_info.daemon = false;