• Wenwen Wang's avatar
    lan78xx: Fix memory leaks · b9cbf8a6
    Wenwen Wang authored
    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 from the function.
    Signed-off-by: default avatarWenwen Wang <wenwen@cs.uga.edu>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b9cbf8a6
lan78xx.c 103 KB