Commit 99c2dcc
nvme-core: fix memory leak in dhchap_ctrl_secret
Free dhchap_secret in nvme_ctrl_dhchap_ctrl_secret_store() before we
return when nvme_auth_generate_key() returns error.
Fixes: f50fff7 ("nvme: implement In-Band authentication")
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>1 parent a836ca3 commit 99c2dcc
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3882 | 3882 | | |
3883 | 3883 | | |
3884 | 3884 | | |
3885 | | - | |
| 3885 | + | |
| 3886 | + | |
3886 | 3887 | | |
| 3888 | + | |
3887 | 3889 | | |
3888 | 3890 | | |
3889 | 3891 | | |
3890 | 3892 | | |
3891 | 3893 | | |
3892 | 3894 | | |
3893 | 3895 | | |
3894 | | - | |
| 3896 | + | |
| 3897 | + | |
3895 | 3898 | | |
3896 | 3899 | | |
3897 | 3900 | | |
| |||
0 commit comments