Subject: Re: [PATCH v2] nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails

From: Dan Carpenter <[email-masked]>
Date: Fri, 5 Nov 2021 17:33:55 +0300

On Fri, Nov 05, 2021 at 06:36:36AM -0700, Chengfeng Ye wrote:
> skb is already freed by dev_kfree_skb in pn533_fill_fragment_skbs,
> but follow error handler branch when pn533_fill_fragment_skbs()
> fails, skb is freed again, results in double free issue. Fix this
> by not free skb in error path of pn533_fill_fragment_skbs.
> 
> Signed-off-by: Chengfeng Ye <[email-masked]>

I sort of wish the commit message talked more about the how this changes
the failure return from 0 to -ENOMEM.  But the patch is good.

Reviewed-by: Dan Carpenter <[email-masked]>

regards,
dan carpenter