diff options
Diffstat (limited to 'net/can')
-rw-r--r-- | net/can/bcm.c | 3 | ||||
-rw-r--r-- | net/can/raw.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c index 95d7f32643ae..1d17e41b892d 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c | |||
@@ -1469,6 +1469,9 @@ static int bcm_release(struct socket *sock) | |||
1469 | bo->ifindex = 0; | 1469 | bo->ifindex = 0; |
1470 | } | 1470 | } |
1471 | 1471 | ||
1472 | sock_orphan(sk); | ||
1473 | sock->sk = NULL; | ||
1474 | |||
1472 | release_sock(sk); | 1475 | release_sock(sk); |
1473 | sock_put(sk); | 1476 | sock_put(sk); |
1474 | 1477 | ||
diff --git a/net/can/raw.c b/net/can/raw.c index 6aa154e806ae..3482546e8884 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -306,6 +306,9 @@ static int raw_release(struct socket *sock) | |||
306 | ro->bound = 0; | 306 | ro->bound = 0; |
307 | ro->count = 0; | 307 | ro->count = 0; |
308 | 308 | ||
309 | sock_orphan(sk); | ||
310 | sock->sk = NULL; | ||
311 | |||
309 | release_sock(sk); | 312 | release_sock(sk); |
310 | sock_put(sk); | 313 | sock_put(sk); |
311 | 314 | ||