diff options
author | Wang ShaoBo <bobo.shaobowang@huawei.com> | 2022-11-24 12:23:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-14 12:15:38 +0300 |
commit | 3fbc3c78fa32d2e7b713a9031ba44a231a9f55b5 (patch) | |
tree | 2fe770f11a36621e8fd69f844c7b96727da5f5aa /net | |
parent | be7d90fc3a8f59adf7f9440ec4451fe8c1f13d7c (diff) | |
download | linux-3fbc3c78fa32d2e7b713a9031ba44a231a9f55b5.tar.xz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 78c6648af782..c478108ca6a6 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1361,7 +1361,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); |