Re: [PATCH] staging: comedi: drivers: prevent memory leak

2019-09-17 Thread Ian Abbott
On 17/09/2019 07:33, Dan Carpenter wrote: On Mon, Sep 16, 2019 at 09:41:43PM -0500, Navid Emamdoost wrote: In das1800_attach, the buffer allocated via kmalloc_array needs to be released if an error happens. Signed-off-by: Navid Emamdoost Commedit calls ->detach() if the ->attach() fails so

Re: [PATCH] staging: comedi: drivers: prevent memory leak

2019-09-17 Thread Dan Carpenter
On Mon, Sep 16, 2019 at 09:41:43PM -0500, Navid Emamdoost wrote: > In das1800_attach, the buffer allocated via kmalloc_array needs to be > released if an error happens. > > Signed-off-by: Navid Emamdoost Commedit calls ->detach() if the ->attach() fails so this patch would lead to a double

[PATCH] staging: comedi: drivers: prevent memory leak

2019-09-16 Thread Navid Emamdoost
In das1800_attach, the buffer allocated via kmalloc_array needs to be released if an error happens. Signed-off-by: Navid Emamdoost --- drivers/staging/comedi/drivers/das1800.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git