infiniband-diags/libibnetdisc/ibnetdisc.c: Handle calloc failure
PATCH 1/1 infiniband-diags/libibnetdisc/ibnetdisc.c: Handle calloc failure
in recv_node_info
---
libibnetdisc/src/ibnetdisc.c +2 -0
@@ -316,6 +316,8 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp,if (!port) {/* If we have not see this port before create a shell for it */ port = node->ports[port_num] =calloc (1 ,sizeof (*port)); +if (!port) +return -1 ; port->node = node; port->portnum = port_num; }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · On Wed, 27 Apr 2011 11:17:46 -0700 Hal Rosenstock…
in
recv_node_info
Good catch,
Thanks, applied,
Ira
Quoted 18 lines
---
libibnetdisc/src/ibnetdisc.c +2
-1@@ -316,6 +316,8 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp,if (!port) {/* If we have not see this port before create a shell for it */ port = node->ports[port_num] =calloc (1 ,sizeof (*port)); +if (!port) +return -1 ; port->node = node; port->portnum = port_num; } --To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 9 lines
Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html