[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200802211412.m1LEC6Pt005040@velma.neteffect.com>
Date: Thu, 21 Feb 2008 08:12:06 -0600
From: gstreiff@...effect.com
To: rdreier@...co.com
Cc: bunk@...nel.org, general@...ts.openfabrics.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2.6 3/8] infiniband/hw/nes/nes_cm.c: fix a memory leak
From: Adrian Bunk <bunk@...nel.org>
This patch fixes a memory leak spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@...nel.org>
Signed-off-by: Glenn Streiff <gstreiff@...effect.com>
---
drivers/infiniband/hw/nes/nes_cm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index bd5cfea..78e845c 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -370,11 +370,11 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
int ret = 0;
u32 was_timer_set;
+ if (!cm_node)
+ return -EINVAL;
new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC);
if (!new_send)
return -1;
- if (!cm_node)
- return -EINVAL;
/* new_send->timetosend = currenttime */
new_send->retrycount = NES_DEFAULT_RETRYS;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists