From edac2cb5cdb831f3c0a8e05a0077ba894758ea75 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 11 Sep 2018 18:24:04 -0400 Subject: [PATCH] oob/ud: remove double free And just for the hecuvit, add in a clarifing comment and a unique return code that more precisely defines the error that occurred. Signed-off-by: Jeff Squyres --- orte/mca/oob/ud/oob_ud_peer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/orte/mca/oob/ud/oob_ud_peer.c b/orte/mca/oob/ud/oob_ud_peer.c index bda4b9a1e06..c9b532e1bcf 100644 --- a/orte/mca/oob/ud/oob_ud_peer.c +++ b/orte/mca/oob/ud/oob_ud_peer.c @@ -6,6 +6,7 @@ * and Technology (RIST). All rights reserved. * 2014 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2018 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -73,6 +74,7 @@ int mca_oob_ud_peer_update_with_uri (mca_oob_ud_peer_t *peer, const char *uri) rc = mca_oob_ud_parse_uri (uri, &qp_num, &lid, &port_num); if (ORTE_SUCCESS != rc) { + /* Only non-SUCCESS value is BAD_PARAM */ return rc; } @@ -107,8 +109,7 @@ int mca_oob_ud_peer_update_with_uri (mca_oob_ud_peer_t *peer, const char *uri) } if (NULL == peer->peer_ah) { - free (peer); - return ORTE_ERROR; + return ORTE_ERR_UNREACH; } }