mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 05:13:18 +00:00
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: 2e738fdce2
("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>
This commit is contained in:
parent
9181f40fb2
commit
50fa355bc0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user