Skip to content

Commit 06ccca7

Browse files
committed
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 <[email protected]> (cherry picked from commit edac2cb)
1 parent 5cab4b6 commit 06ccca7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

orte/mca/oob/ud/oob_ud_peer.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* and Technology (RIST). All rights reserved.
77
* 2014 Mellanox Technologies, Inc.
88
* All rights reserved.
9+
* Copyright (c) 2018 Cisco Systems, Inc. All rights reserved.
910
* $COPYRIGHT$
1011
*
1112
* 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)
7374

7475
rc = mca_oob_ud_parse_uri (uri, &qp_num, &lid, &port_num);
7576
if (ORTE_SUCCESS != rc) {
77+
/* Only non-SUCCESS value is BAD_PARAM */
7678
return rc;
7779
}
7880

@@ -107,8 +109,7 @@ int mca_oob_ud_peer_update_with_uri (mca_oob_ud_peer_t *peer, const char *uri)
107109
}
108110

109111
if (NULL == peer->peer_ah) {
110-
free (peer);
111-
return ORTE_ERROR;
112+
return ORTE_ERR_UNREACH;
112113
}
113114
}
114115

0 commit comments

Comments
 (0)