]> git.karo-electronics.de Git - karo-tx-linux.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)
commit79d0c088801b221330ee3b75cd10912003e3c6dd
tree701e113e6ae1322ad181b78e26cd322919555057
parent409b146225cdefcc76d9956e323e84e510208884
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