Commit 694382d6 authored by Stephen Hemminger's avatar Stephen Hemminger

[ROSE]: Fix use after free in socket destruction.

parent e68ee024
...@@ -359,7 +359,7 @@ void rose_destroy_socket(struct sock *sk) ...@@ -359,7 +359,7 @@ void rose_destroy_socket(struct sock *sk)
sk->sk_timer.data = (unsigned long)sk; sk->sk_timer.data = (unsigned long)sk;
add_timer(&sk->sk_timer); add_timer(&sk->sk_timer);
} else } else
sk_free(sk); sock_put(sk);
} }
/* /*
...@@ -634,7 +634,6 @@ static int rose_release(struct socket *sock) ...@@ -634,7 +634,6 @@ static int rose_release(struct socket *sock)
} }
sock->sk = NULL; sock->sk = NULL;
sk->sk_socket = NULL; /* Not used, but we should do this. **/
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment