summaryrefslogtreecommitdiff
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-20 12:59:19 (GMT)
committerArnd Bergmann <arnd@arndb.de>2011-10-20 12:59:19 (GMT)
commit2f540738f8d228016c6cd0d3b303896c174ecee3 (patch)
tree7e6574c041ac4386763f94d3d401d70f4ab6f55b /net/ipv6/route.c
parenta3849a4c038a21075a0bc7eaf37f65a93976d10c (diff)
parentd8e9c00e38f6947cef7f5466a0a3d369461ab97f (diff)
downloadlinux-fsl-qoriq-2f540738f8d228016c6cd0d3b303896c174ecee3.tar.xz
Merge branch 'tegra/cleanup' into next/cleanup
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1250f90..fb545ed 100644
--- 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;
}