• Wenwen Wang's avatar
    cx82310_eth: fix a memory leak bug · 1eca92ee
    Wenwen Wang authored
    In cx82310_bind(), 'dev->partial_data' is allocated through kmalloc().
    Then, the execution waits for the firmware to become ready. If the firmware
    is not ready in time, the execution is terminated. However, the allocated
    'dev->partial_data' is not deallocated on this path, leading to a memory
    leak bug. To fix this issue, free 'dev->partial_data' before returning the
    error.
    Signed-off-by: default avatarWenwen Wang <wenwen@cs.uga.edu>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1eca92ee
cx82310_eth.c 8.45 KB