ipv6: Fix dst_release of invalid pointer
Subsystems (3)
PATCH 1/1 ipv6: Fix dst_release of invalid pointer
Fix dst_release on a invalid region.
Signed-off-by Krishna Kumar <[email protected]>
--- net/ipv6/addrconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv6/addrconf.c +2 -1
@@ -823,7 +823,8 @@ static void ipv6_del_addr(struct inet6_i rt->rt6i_flags |=RTF_EXPIRES ; } } -dst_release (&rt->u.dst); +if (rt) +dst_release (&rt->u.dst); }in6_ifa_put (ifp);
David Miller
maintainerFrom: Krishna Kumar <[email protected]>
Date: Wed, 27 Jan 2010 12:38:02 +0530
Quoted 3 lines
Fix
dst_releaseon a invalid region.Signed-off-by Krishna Kumar <[email protected]>
NULL, is NULL, is NULL, and always will be NULL.
Even if rt == NULL, &rt->u.dst will be NULL too.
So it's just plain NULL.
You NULL that? :-)
David Miller <[email protected]> wrote on 01/27/2010 12:41:33 PM:
Quoted 7 lines
From: Krishna Kumar <[email protected]>
Date: Wed, 27 Jan 2010 12:38:02 +0530Quoted 3 lines
Fix
dst_releaseon a invalid region.Signed-off-by Krishna Kumar <[email protected]>
Quoted 7 lines
NULL, is NULL, is NULL, and always will be NULL.
Even if rt == NULL,
&rt->u.dstwill be NULL too.So it's just plain NULL.
You NULL that? :-)
Yes :)
I forgot dst_entry was the first element in rt6_info.
thanks,
- KK