[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240719061655.GB29401@breakpoint.cc>
Date: Fri, 19 Jul 2024 08:16:55 +0200
From: Florian Westphal <fw@...len.de>
To: Christian Hopps <chopps@...pps.org>
Cc: devel@...ux-ipsec.org, Steffen Klassert <steffen.klassert@...unet.com>,
netdev@...r.kernel.org, Christian Hopps <chopps@...n.net>
Subject: Re: [devel-ipsec] [PATCH ipsec-next v5 08/17] xfrm: iptfs: add new
iptfs xfrm mode impl
Christian Hopps via Devel <devel@...ux-ipsec.org> wrote:
> +static int iptfs_clone(struct xfrm_state *x, struct xfrm_state *orig)
> +{
> + struct xfrm_iptfs_data *xtfs;
> + int err;
> +
> + xtfs = kmemdup(orig->mode_data, sizeof(*xtfs), GFP_KERNEL);
> + if (!xtfs)
> + return -ENOMEM;
> +
> + err = __iptfs_init_state(x, xtfs);
> + if (err)
> + return err;
Missing kfree on err?
> + xtfs = kzalloc(sizeof(*xtfs), GFP_KERNEL);
> + if (!xtfs)
> + return -ENOMEM;
> +
> + err = __iptfs_init_state(x, xtfs);
> + if (err)
> + return err;
Likewise.
Powered by blists - more mailing lists