projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4cae56
)
ipv6: check return value for dst_alloc
author
Madalin Bucur
<madalin.bucur@freescale.com>
Mon, 26 Sep 2011 07:04:56 +0000
(07:04 +0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 27 Sep 2011 19:32:06 +0000
(15:32 -0400)
return value of dst_alloc must be checked before use
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv6/route.c
b/net/ipv6/route.c
index 1250f902067016d694ea59910778555ad68702bc..fb545edef6ea63e235d6ef161fb057bc0face6dc 100644
(file)
--- a/
net/ipv6/route.c
+++ b/
net/ipv6/route.c
@@
-244,7
+244,9
@@
static inline struct rt6_info *ip6_dst_alloc(struct dst_ops *ops,
{
struct rt6_info *rt = dst_alloc(ops, dev, 0, 0, flags);
- memset(&rt->rt6i_table, 0, sizeof(*rt) - sizeof(struct dst_entry));
+ if (rt != NULL)
+ memset(&rt->rt6i_table, 0,
+ sizeof(*rt) - sizeof(struct dst_entry));
return rt;
}