• L
    USB: usbfs: properly clean up the as structure on error paths · ddeee0b2
    Linus Torvalds 提交于
    I notice that the processcompl_compat() function seems to be leaking the
    'struct async *as' in the error paths. 
    
    I think that the calling convention is fundamentally buggered. The
    caller is the one that did the "reap_as()" to get the as thing, the
    caller should be the one to free it too. 
    
    Freeing it in the caller also means that it very clearly always gets
    freed, and avoids the need for any "free in the error case too".
    
    From: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Alan Stern <stern@rowland.harvard.edu>
    Cc: Marcus Meissner <meissner@suse.de>
    Cc: stable <stable@kernel.org>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    ddeee0b2
devio.c 49.6 KB