Thread (12 messages) 12 messages, 3 authors, 2012-10-30

Re: [Patch net-next] ipv6: fix a potential NULL deref

flat view

From: Eric Dumazet <hidden>
Date: 2012-10-29 07:05:39

On Mon, 2012-10-29 at 14:49 +0800, Cong Wang wrote:
On Mon, 2012-10-29 at 07:10 +0100, Eric Dumazet wrote:
quoted
quoted
-		dst_release(&rt->dst);
+		if (rt)
+			dst_release(&rt->dst);
 	}
 
dst_release() is like kfree(), it accepts a NULL argument.
'rt->dst' already dereferences 'rt', no matter dst_release() accepts
NULL or not.
&rt->dst doesnt dereference rt, you are quite mistaken.

if rt is NULL, &rt->dst is also NULL
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help