diff options
author | Madalin Bucur <madalin.bucur@freescale.com> | 2011-09-26 07:04:56 +0000 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2012-05-09 22:28:24 -0700 |
commit | a0e6c2f9f297c760797980d9ccfe2eb00fc5b46d (patch) | |
tree | 7b222ad42f46922390f105909984cc7ed661e288 /net | |
parent | 25914de08dadda721c38175be33b667481ee1ff5 (diff) | |
download | kernel_samsung_aries-a0e6c2f9f297c760797980d9ccfe2eb00fc5b46d.zip kernel_samsung_aries-a0e6c2f9f297c760797980d9ccfe2eb00fc5b46d.tar.gz kernel_samsung_aries-a0e6c2f9f297c760797980d9ccfe2eb00fc5b46d.tar.bz2 |
ipv6: check return value for dst_alloc
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/route.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8e600f8..7ef5d08 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -233,7 +233,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; } |