aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorWenwen Wang <wenwen@cs.uga.edu>2019-08-18 13:54:46 -0500
committerDoug Ledford <dledford@redhat.com>2019-08-20 13:44:45 -0400
commit2323d7baab2b18d87d9bc267452e387aa9f0060a (patch)
tree0b9297714a43ed975cbd4062ccbe5bfcb273a4ef /drivers/infiniband/sw
parentinfiniband: hfi1: fix a memory leak bug (diff)
downloadlinux-dev-2323d7baab2b18d87d9bc267452e387aa9f0060a.tar.xz
linux-dev-2323d7baab2b18d87d9bc267452e387aa9f0060a.zip
infiniband: hfi1: fix memory leaks
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> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Link: https://lore.kernel.org/r/1566154486-3713-1-git-send-email-wenwen@cs.uga.edu Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
0 files changed, 0 insertions, 0 deletions