From 8cda1b3dc61078f78a684cface902dae749f3b01 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 30 Apr 2014 18:12:48 +0000 Subject: [PATCH] Don't store cpu_bitmap unless it is non-NULL This commit was SVN r31570. --- orte/util/nidmap.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/orte/util/nidmap.c b/orte/util/nidmap.c index f86f542723..fc4d13e212 100644 --- a/orte/util/nidmap.c +++ b/orte/util/nidmap.c @@ -1140,18 +1140,18 @@ int orte_util_decode_pidmap(opal_byte_object_t *bo) } OBJ_DESTRUCT(&kv); #if OPAL_HAVE_HWLOC - OBJ_CONSTRUCT(&kv, opal_value_t); - kv.key = strdup(OPAL_DSTORE_CPUSET); - kv.type = OPAL_STRING; - kv.data.string = strdup(cpu_bitmap); - if (ORTE_SUCCESS != (rc = opal_dstore.store(opal_dstore_internal, - (opal_identifier_t*)&proc, &kv))) { - ORTE_ERROR_LOG(rc); - OBJ_DESTRUCT(&kv); - goto cleanup; - } - OBJ_DESTRUCT(&kv); if (NULL != cpu_bitmap) { + OBJ_CONSTRUCT(&kv, opal_value_t); + kv.key = strdup(OPAL_DSTORE_CPUSET); + kv.type = OPAL_STRING; + kv.data.string = strdup(cpu_bitmap); + if (ORTE_SUCCESS != (rc = opal_dstore.store(opal_dstore_internal, + (opal_identifier_t*)&proc, &kv))) { + ORTE_ERROR_LOG(rc); + OBJ_DESTRUCT(&kv); + goto cleanup; + } + OBJ_DESTRUCT(&kv); free(cpu_bitmap); } #endif