diff options
author | Wenwen Wang <wenwen@cs.uga.edu> | 2019-08-18 14:29:31 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-08-20 13:44:45 -0400 |
commit | b08afa064c320e5d85cdc27228426b696c4c8dae (patch) | |
tree | 5f41c4ddaa140550337a2a66cdd4efb0fa2d1bfa /block/scsi_ioctl.c | |
parent | 5c1baaa82cea2c815a5180ded402a7cd455d1810 (diff) | |
download | linux-stable-b08afa064c320e5d85cdc27228426b696c4c8dae.tar.gz linux-stable-b08afa064c320e5d85cdc27228426b696c4c8dae.tar.bz2 linux-stable-b08afa064c320e5d85cdc27228426b696c4c8dae.zip |
infiniband: hfi1: fix a memory leak bug
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 <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/1566156571-4335-1-git-send-email-wenwen@cs.uga.edu
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'block/scsi_ioctl.c')
0 files changed, 0 insertions, 0 deletions