From bf1cff3711d780d37e6c3895c8e95626d774146a Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 14 Feb 2011 20:58:22 +0000 Subject: [PATCH] Plug a couple of additional memory leaks - try to highlight a little better that strings returned from reg_string_name must be freed by caller This commit was SVN r24383. --- opal/mca/base/mca_base_param.h | 2 +- opal/util/net.c | 1 + orte/mca/notifier/base/notifier_base_open.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/opal/mca/base/mca_base_param.h b/opal/mca/base/mca_base_param.h index b330f5df60..c625211f68 100644 --- a/opal/mca/base/mca_base_param.h +++ b/opal/mca/base/mca_base_param.h @@ -321,7 +321,7 @@ BEGIN_C_DECLS * never be NULL. It will always have a value, even if that value is * the empty string. * - * Strings returned in the \em current_value parameter should later + * NOTE: Strings returned in the \em current_value parameter should later * be free()'ed. * * This function is identical to mca_base_param_reg_int() except diff --git a/opal/util/net.c b/opal/util/net.c index 64de72bb13..62c36b3aaf 100644 --- a/opal/util/net.c +++ b/opal/util/net.c @@ -137,6 +137,7 @@ opal_net_init() &string_value ); args = opal_argv_split( string_value, ';' ); + free(string_value); if( NULL != args ) { count = opal_argv_count(args); private_ipv4 = (private_ipv4_t*)malloc( (count + 1) * sizeof(private_ipv4_t)); diff --git a/orte/mca/notifier/base/notifier_base_open.c b/orte/mca/notifier/base/notifier_base_open.c index 0b683f1a25..9b35b62b5f 100644 --- a/orte/mca/notifier/base/notifier_base_open.c +++ b/orte/mca/notifier/base/notifier_base_open.c @@ -98,6 +98,7 @@ int orte_notifier_base_open(void) opal_output(0, "Unknown notifier level"); return ORTE_ERROR; } + free(level); OBJ_CONSTRUCT(&orte_notifier_base_selected_modules, opal_list_t); OBJ_CONSTRUCT(&orte_notifier_log_selected_modules, opal_list_t);