Re: [PATCH] lan78xx: Fix memory leaks

2019-08-16 Thread David Miller
From: Wenwen Wang Date: Wed, 14 Aug 2019 11:23:13 -0500 > In lan78xx_probe(), a new urb is allocated through usb_alloc_urb() and > saved to 'dev->urb_intr'. However, in the following execution, if an error > occurs, 'dev->urb_intr' is not deallocated, leading to memory leaks. To fix > this issue,

[PATCH] lan78xx: Fix memory leaks

2019-08-14 Thread Wenwen Wang
In lan78xx_probe(), a new urb is allocated through usb_alloc_urb() and saved to 'dev->urb_intr'. However, in the following execution, if an error occurs, 'dev->urb_intr' is not deallocated, leading to memory leaks. To fix this issue, invoke usb_free_urb() to free the allocated urb before returning