in recv_node_info

Signed-off-by: Hal Rosenstock <[email protected]>
---
diff --git a/libibnetdisc/src/ibnetdisc.c b/libibnetdisc/src/ibnetdisc.c
index 0d3f60a..e4487c1 100644
--- a/libibnetdisc/src/ibnetdisc.c
+++ b/libibnetdisc/src/ibnetdisc.c
@@ -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

Reply via email to