projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1256eb
)
rapidio: fix potential null deref on failure path
author
Dan Carpenter
<[error27@gmail.com]>
Wed, 23 Mar 2011 23:43:07 +0000
(16:43 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:44 +0000
(19:46 -0700)
If rio is not a switch then "rswitch" is null.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rapidio/rio-scan.c
patch
|
blob
|
history
diff --git
a/drivers/rapidio/rio-scan.c
b/drivers/rapidio/rio-scan.c
index a50391b6ba2a95b8afcc6d397a90c068c5f9bc36..3a59d5f018d39126f575d1c31b241812e85359ef 100644
(file)
--- 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 (r
switch->route_table
)
+ if (r
io_is_switch(rdev)
)
kfree(rswitch->route_table);
kfree(rdev);