x25: Do not reference freed memory.
authorDavid S. Miller <davem@davemloft.net>
Thu, 10 Feb 2011 05:48:36 +0000 (21:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Feb 2011 06:36:13 +0000 (22:36 -0800)
commit96642d42f076101ba98866363d908cab706d156c
tree07043558ca37f51e072cf32c0a3a7db05dd91ce7
parentebc02e9c524e9ff377dd8a3820522d381adf19c8
x25: Do not reference freed memory.

In x25_link_free(), we destroy 'nb' before dereferencing
'nb->dev'.  Don't do this, because 'nb' might be freed
by then.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/x25/x25_link.c