Re: [PATCH] infiniband: hfi1: fix a memory leak bug

2019-08-20 Thread Doug Ledford
On Sun, 2019-08-18 at 14:29 -0500, Wenwen Wang wrote: > In fault_opcodes_read(), 'data' is not deallocated if > debugfs_file_get() > fails, leading to a memory leak. To fix this bug, introduce the > 'free_data' > label to free 'data' before returning the error. > > Signed-off-by: Wenwen Wang App

Re: [PATCH] infiniband: hfi1: fix a memory leak bug

2019-08-19 Thread Dennis Dalessandro
On 8/18/2019 3:29 PM, Wenwen Wang wrote: In fault_opcodes_read(), 'data' is not deallocated if debugfs_file_get() fails, leading to a memory leak. To fix this bug, introduce the 'free_data' label to free 'data' before returning the error. Signed-off-by: Wenwen Wang Acked-by: Dennis Dalessandr

Re: [PATCH] infiniband: hfi1: fix a memory leak bug

2019-08-19 Thread Leon Romanovsky
On Sun, Aug 18, 2019 at 02:29:31PM -0500, Wenwen Wang wrote: > In fault_opcodes_read(), 'data' is not deallocated if debugfs_file_get() > fails, leading to a memory leak. To fix this bug, introduce the 'free_data' > label to free 'data' before returning the error. > > Signed-off-by: Wenwen Wang >

[PATCH] infiniband: hfi1: fix a memory leak bug

2019-08-18 Thread Wenwen Wang
In fault_opcodes_read(), 'data' is not deallocated if debugfs_file_get() fails, leading to a memory leak. To fix this bug, introduce the 'free_data' label to free 'data' before returning the error. Signed-off-by: Wenwen Wang --- drivers/infiniband/hw/hfi1/fault.c | 3 ++- 1 file changed, 2 inser