aboutsummaryrefslogtreecommitdiff
path: root/contrib/ofed/librdmacm
diff options
context:
space:
mode:
authorEric van Gyzen <vangyzen@FreeBSD.org>2020-07-15 13:17:16 +0000
committerEric van Gyzen <vangyzen@FreeBSD.org>2020-07-15 13:17:16 +0000
commitd13def78ccef6dbc25c2e197089ee5fc4d7b82c3 (patch)
tree74730d7fcc6e6038a4ccc95deed9fb1c6cccf0a6 /contrib/ofed/librdmacm
parentea6c594cbc027d9285ddeee42f84dbd7d12abc3e (diff)
downloadsrc-d13def78ccef6dbc25c2e197089ee5fc4d7b82c3.tar.gz
src-d13def78ccef6dbc25c2e197089ee5fc4d7b82c3.zip
Fix Coverity issues in OFED
read_ibdiag_config NULL deref read_ibdiag_config mem leak ib_mad_inv_field_str Missing comma in a string array initialization print_node_header NULL deref diff_node_ports copy-paste error ibportstate.c main() missing break in switch set_thresholds NULL ptr deref dump_unicast_tables leaks mapnd umad_cm_attr_str dead code __ibv_close_device close(-1) check return value of listen() mlx5 bitmap.h - bad bit shift - UB get_dst_addr check return value of inet_pton osm_perfmgr_init check return value of cl_spinlock_init osm_port_new memory leak on error path sa_mad_ctrl_rcv_callback missing break in switch case I did not include CID numbers because these were found by an internal run at Isilon. Reviewed by: cem kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25676
Notes
Notes: svn path=/head/; revision=363220
Diffstat (limited to 'contrib/ofed/librdmacm')
-rw-r--r--contrib/ofed/librdmacm/examples/mckey.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/ofed/librdmacm/examples/mckey.c b/contrib/ofed/librdmacm/examples/mckey.c
index b39a2e0c9371..65c80d4efc7f 100644
--- a/contrib/ofed/librdmacm/examples/mckey.c
+++ b/contrib/ofed/librdmacm/examples/mckey.c
@@ -469,8 +469,7 @@ static int get_dst_addr(char *dst, struct sockaddr *addr)
sib = (struct sockaddr_ib *) addr;
memset(sib, 0, sizeof *sib);
sib->sib_family = AF_IB;
- inet_pton(AF_INET6, dst, &sib->sib_addr);
- return 0;
+ return inet_pton(AF_INET6, dst, &sib->sib_addr) != 1;
}
static int run(void)