Message ID | 20231116164822.427485-6-jiri@resnulli.us (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | devlink: introduce notifications filtering | expand |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 92ef5ed2e7b0..905c5a167f53 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -1699,12 +1699,18 @@ static int genl_bind(struct net *net, int group) return ret; } +static void genl_release(struct sock *sk, unsigned long *groups) +{ + kfree(sk->sk_user_data); +} + static int __net_init genl_pernet_init(struct net *net) { struct netlink_kernel_cfg cfg = { .input = genl_rcv, .flags = NL_CFG_F_NONROOT_RECV, .bind = genl_bind, + .release = genl_release, }; /* we'll bump the group number right afterwards */