Re: [patch] usb: gadget: f_tcm: memory leak on error in tcm_alloc_inst()

2015-12-10 Thread Felipe Balbi
Dan Carpenter writes: > We need to kfree(opts) on error. Also it's nicer to allocate opts > before taking the lock. > > Signed-off-by: Dan Carpenter what's the base for this commit ? I don't have f_tcm.c anywhere. -- balbi signature.asc

[patch] usb: gadget: f_tcm: memory leak on error in tcm_alloc_inst()

2015-12-09 Thread Dan Carpenter
We need to kfree(opts) on error. Also it's nicer to allocate opts before taking the lock. Signed-off-by: Dan Carpenter diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c index ed47e40..0a26a2e 100644 ---