Skip to content

Commit 10f9614

Browse files
authored
Merge pull request #5675 from jsquyres/pr/v3.1.x/fix-oob-ud-double-free
v3.1.x: oob/ud: remove double free
2 parents 2339a4b + 06ccca7 commit 10f9614

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)