diff options
author | Wang ShaoBo <bobo.shaobowang@huawei.com> | 2022-11-24 17:23:42 +0800 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-12-06 12:21:38 -0500 |
commit | 50fa355bc0d75911fe9d5072a5ba52cdb803aff7 (patch) | |
tree | 5f4e0610f5393cdd2b345ea9ae92aa94b79f56ea /net/sunrpc | |
parent | 9181f40fb2952fd59ecb75e7158620c9c669eee3 (diff) | |
download | linux-50fa355bc0d75911fe9d5072a5ba52cdb803aff7.tar.bz2 |
SUNRPC: Fix missing release socket in rpc_sockname()
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>
Diffstat (limited to 'net/sunrpc')
-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 993acf38af87..0b0b9f1eed46 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1442,7 +1442,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); |