* [PATCH] infiniband-diags/libibnetdisc/ibnetdisc.c: Handle calloc failure
@ 2011-04-27 18:17 Hal Rosenstock
[not found] ` <4DB85DCA.40800-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2011-04-27 18:17 UTC (permalink / raw)
To: Ira Weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
in recv_node_info
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <4DB85DCA.40800-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>]
* Re: [PATCH] infiniband-diags/libibnetdisc/ibnetdisc.c: Handle calloc failure [not found] ` <4DB85DCA.40800-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> @ 2011-04-27 21:55 ` Ira Weiny 0 siblings, 0 replies; 2+ messages in thread From: Ira Weiny @ 2011-04-27 21:55 UTC (permalink / raw) To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Wed, 27 Apr 2011 11:17:46 -0700 Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote: > > in recv_node_info > > Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Good catch, Thanks, applied, Ira > --- > 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 weiny2-i2BcT+NCU+M@public.gmane.org -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-27 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 18:17 [PATCH] infiniband-diags/libibnetdisc/ibnetdisc.c: Handle calloc failure Hal Rosenstock
[not found] ` <4DB85DCA.40800-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-04-27 21:55 ` Ira Weiny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox