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

2019-08-15 Thread Oliver Neukum
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'

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

2019-08-14 Thread Jack Pham
On Wed, Aug 14, 2019 at 12:41:33PM -0500, Wenwen Wang wrote: > 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' i

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

2019-08-14 Thread 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 bu