RE: [EXT] [PATCH] ethernet: atheros: fix a memleak in atl1e_setup_ring_resources

From: Suman Ghosh
Date: Thu Dec 07 2023 - 12:57:21 EST


>On Thu, 7 Dec 2023 17:08:15 +0000 Suman Ghosh wrote:
>> >+ kfree(tx_ring->tx_buffer);
>>
>> [Suman] I think we should do tx_ring->tx_buffer = NULL also, to avoid
>use after free?
>
>It's up to the driver. Some may call that defensive programming.
[Suman] Agree. I pointed it out since this driver is using this approach at other places. But sure, it is up to Zhipeng.