Skip to content

Commit

Permalink
net: Unlock sock before calling sk_free()
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
KAGA-KOKO authored and davem330 committed Oct 25, 2011
1 parent 7670c70 commit b0691c8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,7 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
/* It is still raw copy of parent, so invalidate
* destructor and make plain sk_free() */
newsk->sk_destruct = NULL;
bh_unlock_sock(newsk);
sk_free(newsk);
newsk = NULL;
goto out;
Expand Down

0 comments on commit b0691c8

Please sign in to comment.