| Submitter | Andy Whitcroft |
|---|---|
| Date | June 13, 2011, 10:25 a.m. |
| Message ID | <1307960719-21404-1-git-send-email-apw@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/100155/ |
| State | New |
| Headers | show |
Comments
Please ignore, will resend with the appropriate flyer. -apw
Patch
diff --git a/net/can/bcm.c b/net/can/bcm.c index 9d5e8ac..56d20a2 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -1424,9 +1424,14 @@ static int bcm_init(struct sock *sk) static int bcm_release(struct socket *sock) { struct sock *sk = sock->sk; - struct bcm_sock *bo = bcm_sk(sk); + struct bcm_sock *bo; struct bcm_op *op, *next; + if (sk == NULL) + return 0; + + bo = bcm_sk(sk); + /* remove bcm_ops, timer, rx_unregister(), etc. */ unregister_netdevice_notifier(&bo->notifier);