Re: [PATCH] [PATCH] usb: gadget: composite: Fix double free memory bug

2019-03-19 Thread mgautam
Hi, On 2019-03-15 16:37, Chandana Kishori Chiluveru wrote: configfs_dev_cleanup function can double free os_desc and buffer when called from different context. For example, this can be called from composite_unbind() and when composite_bind() fails. Shouldn't we instead fix the error path handl

[PATCH] [PATCH] usb: gadget: composite: Fix double free memory bug

2019-03-15 Thread Chandana Kishori Chiluveru
configfs_dev_cleanup function can double free os_desc and buffer when called from different context. For example, this can be called from composite_unbind() and when composite_bind() fails. Fix this issue by setting request and buffer pointer to NULL after kfree. Signed-off-by: Chandana Kishori Ch