crypto: af_alg - Fix socket double-free when accept fails

commit a383292c86 upstream.

When we fail an accept(2) call we will end up freeing the socket
twice, once due to the direct sk_free call and once again through
newsock.

This patch fixes this by removing the sk_free call.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
This commit is contained in:
Herbert Xu 2015-12-30 20:24:17 +08:00 • committed by Luis Henriques
commit 080df2ea77