Re: [PATCH] net: usbnet: fix a memory leak bug

From: Oliver Neukum
Date: Thu Aug 15 2019 - 06:42:07 EST


Am Mittwoch, den 14.08.2019, 12:41 -0500 schrieb Wenwen Wang:
> In usbnet_start_xmit(), 'urb->sg' is allocated through kmalloc_array() by
> invoking build_dma_sg(). Later on, if 'CONFIG_PM' is defined and the if
> branch is taken, the execution will go to the label 'deferred'. However,
> 'urb->sg' is not deallocated on this execution path, leading to a memory
> leak bug.

Just to make this clear:

> Signed-off-by: Wenwen Wang <wenwen@xxxxxxxxxx>
NACK

For the reason Jack explained. Deferral is not a failure.

Regards
Oliver