[PATCH 1/1] scsi:mvsas:fix memory leak

2018-04-03 Thread Xidong Wang
In function mvs_pci_init(), the memory allocated by scsi_host_alloc() is not released on the error path that mvi, which holds the return value of mvs_pci_alloc(), is NULL. This will result in a memory leak bug. Signed-off-by: Xidong Wang --- drivers/scsi/mvsas/mv_init.c |

[PATCH 1/1] scsi:mvsas:fix memory leak

2018-04-03 Thread Xidong Wang
In function mvs_pci_init(), the memory allocated by scsi_host_alloc() is not released on the error path that mvi, which holds the return value of mvs_pci_alloc(), is NULL. This will result in a memory leak bug. Signed-off-by: Xidong Wang --- drivers/scsi/mvsas/mv_init.c | 4 +++- 1 file