Skip to content

Commit 31091ce

Browse files
committed
SUNRPC: Fix missing release socket in rpc_sockname()
jira LE-1907 Rebuild_History Non-Buildable kernel-5.14.0-284.30.1.el9_2 commit-author Wang ShaoBo <bobo.shaobowang@huawei.com> commit 50fa355 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> (cherry picked from commit 50fa355) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 128a094 commit 31091ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/clnt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ static int rpc_sockname(struct net *net, struct sockaddr *sap, size_t salen,
13911391
break;
13921392
default:
13931393
err = -EAFNOSUPPORT;
1394-
goto out;
1394+
goto out_release;
13951395
}
13961396
if (err < 0) {
13971397
dprintk("RPC: can't bind UDP socket (%d)\n", err);

0 commit comments

Comments
 (0)