Commit 3b01d7e
scsi: scsi_debug: Fix memleak in scsi_debug_init()
When sdeb_zbc_model does not match BLK_ZONED_NONE, BLK_ZONED_HA or
BLK_ZONED_HM, we should free sdebug_q_arr to prevent memleak. Also there is
no need to execute sdebug_erase_store() on failure of sdeb_zbc_model_str().
Link: https://lore.kernel.org/r/20201226061503.20050-1-dinghao.liu@zju.edu.cn
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 39718fe commit 3b01d7e
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6740 | 6740 | | |
6741 | 6741 | | |
6742 | 6742 | | |
6743 | | - | |
| 6743 | + | |
6744 | 6744 | | |
6745 | 6745 | | |
6746 | 6746 | | |
| |||
6753 | 6753 | | |
6754 | 6754 | | |
6755 | 6755 | | |
6756 | | - | |
| 6756 | + | |
| 6757 | + | |
6757 | 6758 | | |
6758 | 6759 | | |
6759 | 6760 | | |
| |||
0 commit comments