aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/l2tp/l2tp_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 0dd50c079f29..45373fee38c5 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -191,6 +191,7 @@ struct sock *l2tp_tunnel_sock_lookup(struct l2tp_tunnel *tunnel)
191 } else { 191 } else {
192 /* Socket is owned by kernelspace */ 192 /* Socket is owned by kernelspace */
193 sk = tunnel->sock; 193 sk = tunnel->sock;
194 sock_hold(sk);
194 } 195 }
195 196
196out: 197out:
@@ -209,6 +210,7 @@ void l2tp_tunnel_sock_put(struct sock *sk)
209 } 210 }
210 sock_put(sk); 211 sock_put(sk);
211 } 212 }
213 sock_put(sk);
212} 214}
213EXPORT_SYMBOL_GPL(l2tp_tunnel_sock_put); 215EXPORT_SYMBOL_GPL(l2tp_tunnel_sock_put);
214 216