lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

  • Linus Torvalds's avatar
    USB: usbfs: properly clean up the as structure on error paths · fda97593
    Linus Torvalds authored
    commit ddeee0b2 upstream.
    
    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>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    fda97593
devio.c 47.4 KB