All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] rapidio: potential null deref on failure path
@ 2011-03-19  4:40 ` Dan Carpenter
  0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2011-03-19  4:40 UTC (permalink / raw)
  To: Matt Porter; +Cc: Alexandre Bounine, linux-kernel, kernel-janitors

If rio is not a switch then "rswitch" is null.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index a50391b..3a59d5f 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -517,7 +517,7 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net,
 	return rdev;
 
 cleanup:
-	if (rswitch->route_table)
+	if (rio_is_switch(rdev))
 		kfree(rswitch->route_table);
 
 	kfree(rdev);

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-03-21 18:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-19  4:40 [patch] rapidio: potential null deref on failure path Dan Carpenter
2011-03-19  4:40 ` Dan Carpenter
2011-03-21 12:49 ` Bounine, Alexandre
2011-03-21 12:49   ` Bounine, Alexandre
2011-03-21 14:59   ` Dan Carpenter
2011-03-21 14:59     ` Dan Carpenter
2011-03-21 15:15     ` Bounine, Alexandre
2011-03-21 15:15       ` Bounine, Alexandre
2011-03-21 15:52       ` Dan Carpenter
2011-03-21 15:52         ` Dan Carpenter
2011-03-21 16:05         ` Bounine, Alexandre
2011-03-21 16:05           ` Bounine, Alexandre
2011-03-21 18:34 ` Bounine, Alexandre
2011-03-21 18:34   ` Bounine, Alexandre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.