l2tp: ensure sessions are freed after their PPPOL2TP socket
[pandora-kernel.git] / net / l2tp / l2tp_ppp.c
index 9af7f24..b308116 100644 (file)
@@ -466,11 +466,11 @@ static void pppol2tp_session_close(struct l2tp_session *session)
        BUG_ON(session->magic != L2TP_SESSION_MAGIC);
 
 
-       if (sock) {
+       if (sock)
                inet_shutdown(sock, 2);
-               /* Don't let the session go away before our socket does */
-               l2tp_session_inc_refcount(session);
-       }
+
+       /* Don't let the session go away before our socket does */
+       l2tp_session_inc_refcount(session);
        return;
 }