From: Wang ShaoBo Date: Thu, 24 Nov 2022 09:23:42 +0000 (+0800) Subject: SUNRPC: Fix missing release socket in rpc_sockname() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=68ee72bc3d11c5df3c5d44718419b5991e39cb09;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git SUNRPC: Fix missing release socket in rpc_sockname() [ Upstream commit 50fa355bc0d75911fe9d5072a5ba52cdb803aff7 ] socket dynamically created is not released when getting an unintended address family type in rpc_sockname(), direct to out_release for calling sock_release(). Fixes: 2e738fdce22f ("SUNRPC: Add API to acquire source address") Signed-off-by: Wang ShaoBo Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 9259529e0412..411925b043cc 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1267,7 +1267,7 @@ static int rpc_sockname(struct net *net, struct sockaddr *sap, size_t salen, break; default: err = -EAFNOSUPPORT; - goto out; + goto out_release; } if (err < 0) { dprintk("RPC: can't bind UDP socket (%d)\n", err);