aboutsummaryrefslogtreecommitdiff
path: root/net/llc/af_llc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r--net/llc/af_llc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 233794435bb..5a04db745c8 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -187,8 +187,10 @@ static int llc_ui_release(struct socket *sock)
llc->laddr.lsap, llc->daddr.lsap);
if (!llc_send_disc(sk))
llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo);
- if (!sock_flag(sk, SOCK_ZAPPED))
+ if (!sock_flag(sk, SOCK_ZAPPED)) {
+ llc_sap_put(llc->sap);
llc_sap_remove_socket(llc->sap, sk);
+ }
release_sock(sk);
if (llc->dev)
dev_put(llc->dev);