Messages in this thread | | | Date | Mon, 19 Aug 2019 15:03:11 +0300 | From | Leon Romanovsky <> | Subject | Re: [PATCH] infiniband: hfi1: fix memory leaks |
| |
On Sun, Aug 18, 2019 at 01:54:46PM -0500, Wenwen Wang wrote: > In fault_opcodes_write(), 'data' is allocated through kcalloc(). However, > it is not deallocated in the following execution if an error occurs, > leading to memory leaks. To fix this issue, introduce the 'free_data' label > to free 'data' before returning the error. > > Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu> > --- > drivers/infiniband/hw/hfi1/fault.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >
Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
| |