From a754674fd75adfc59aaa1e7419c4adbf420fce62 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Fri, 9 Nov 2012 16:33:14 +0000 Subject: [PATCH] Per the specification for putenv (http://pubs.opengroup.org/onlinepubs/009604599/functions/putenv.html) the string given to putenv becomes part of the environment. The string must not be changed or freed. cmr:v1.7 This commit was SVN r27578. --- opal/runtime/opal_info_support.c | 1 - orte/runtime/orte_info_support.c | 1 - 2 files changed, 2 deletions(-) diff --git a/opal/runtime/opal_info_support.c b/opal/runtime/opal_info_support.c index 700b1064f9..eb10cbbcdb 100644 --- a/opal/runtime/opal_info_support.c +++ b/opal/runtime/opal_info_support.c @@ -272,7 +272,6 @@ int opal_info_register_components(opal_pointer_array_t *mca_types, /* can't manipulate it directly, so make a copy first */ asprintf(&target, "%s=", env); putenv(target); - free(target); } free(env); } diff --git a/orte/runtime/orte_info_support.c b/orte/runtime/orte_info_support.c index 9b8a37ffc2..99444ab514 100644 --- a/orte/runtime/orte_info_support.c +++ b/orte/runtime/orte_info_support.c @@ -108,7 +108,6 @@ int orte_info_register_components(opal_pointer_array_t *mca_types, /* can't manipulate it directly, so make a copy first */ asprintf(&target, "%s=", env); putenv(target); - free(target); } free(env); }