• David Brownell's avatar
    [PATCH] USB: rndis (2/4) fix memory leaks · ebf02028
    David Brownell authored
    Tao Huang wrote:
    > I'm writing udc driver for S3C2410. I found RNDIS almost not call my
    > driver's free_request and free_buffer. So after run my driver about 3
    > hours the system will out of memory.
    >
    > This patch will fix the memory leak.
    >
    > There will still have memory leak when driver unload, but I don't known
    > where is the proper place to fix it.
    > 1) rndis.c should free resp_queue when it unload
    > 2) ether.c should free tx_reqs and rx_reqs when it unload (as
    > eth_reset_config)
    
    Thanks ... this is a nice patch to have.
    
    
    From:          Tao Huang <huangt@star-net.cn>
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    ebf02028
ether.c 68.7 KB