Commit dafd6c4
libata: ensure host is free'd on error exit paths
The host structure is not being kfree'd on two error exit paths
leading to memory leaks. Add in new err_free label and kfree host.
Detected by CoverityScan, CID#1466103 ("Resource leak")
Fixes: 2623c7a ("libata: add refcounting to ata_host")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>1 parent f0f5671 commit dafd6c4
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6087 | 6087 | | |
6088 | 6088 | | |
6089 | 6089 | | |
6090 | | - | |
| 6090 | + | |
6091 | 6091 | | |
6092 | 6092 | | |
6093 | 6093 | | |
| |||
6119 | 6119 | | |
6120 | 6120 | | |
6121 | 6121 | | |
| 6122 | + | |
| 6123 | + | |
6122 | 6124 | | |
6123 | 6125 | | |
6124 | 6126 | | |
| |||
0 commit comments