On Fri 12-09-25 13:52:34, Christian Brauner wrote:
> Don't cargo-cult the same thing over and over.
>
> Signed-off-by: Christian Brauner <[email protected]>
...
> @@ -559,7 +572,9 @@ struct net *copy_net_ns(unsigned long flags,
> goto dec_ucounts;
> }
>
> - preinit_net(net, user_ns);
> + rv = preinit_net(net, user_ns);
> + if (rv < 0)
> + goto dec_ucounts;
Umm, this seems to be leaking 'net' on error exit.
> net->ucounts = ucounts;
> get_user_ns(user_ns);
>
Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR