Skip to content

Commit 50fa355

Browse files
Wang ShaoBoTrond Myklebust
authored andcommitted
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: 2e738fd ("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>
1 parent 9181f40 commit 50fa355

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/sunrpc/clnt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ static int rpc_sockname(struct net *net, struct sockaddr *sap, size_t salen,
14421442
break;
14431443
default:
14441444
err = -EAFNOSUPPORT;
1445-
goto out;
1445+
goto out_release;
14461446
}
14471447
if (err < 0) {
14481448
dprintk("RPC: can't bind UDP socket (%d)\n", err);

0 commit comments

Comments
 (0)