]> git.baikalelectronics.ru Git - kernel.git/commit
staging/rdma/hfi1: Fix memory leaks
authorJubin John <jubin.john@intel.com>
Fri, 26 Feb 2016 21:33:33 +0000 (13:33 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:45:47 +0000 (20:45 -0500)
commitffe49442af10e2887ba1ee67e2508632103390cd
tree701e113e6ae1322ad181b78e26cd322919555057
parentb71540c3d518be38b29a325cd38452c1eb74d39f
staging/rdma/hfi1: Fix memory leaks

Fix 3 memory leaks reported by the LeakCheck tool in the KEDR framework.

The following resources were allocated memory during their respective
initializations but not freed during cleanup:
1. SDMA map elements
2. PIO map elements
3. HW send context to SW index map

This patch fixes the memory leaks by freeing the allocated memory in the
cleanup path.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/init.c
drivers/staging/rdma/hfi1/pio.c
drivers/staging/rdma/hfi1/sdma.c