mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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 <bobo.shaobowang@huawei.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b471fe61da
commit
68ee72bc3d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user