]> git.baikalelectronics.ru Git - kernel.git/commit
ax25: Fix possible oops in ax25_make_new
authorJarek Poplawski <jarkao2@gmail.com>
Sun, 27 Sep 2009 10:57:02 +0000 (10:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2009 23:44:12 +0000 (16:44 -0700)
commitfbf80ae583c0273a1ff6e235e43646e7a8db886e
treef866c6daea8affedbe04bba6948bd688e9500498
parent1763ce0bb5a2b53924bdb2879c54c4d90da377a3
ax25: Fix possible oops in ax25_make_new

In ax25_make_new, if kmemdup of digipeat returns an error, there would
be an oops in sk_free while calling sk_destruct, because sk_protinfo
is NULL at the moment; move sk->sk_destruct initialization after this.

BTW of reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ax25/af_ax25.c