Commit 90022b3
dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
Memory allocated for idxd is not freed if an error occurs during
idxd_pci_probe(). To fix it, free the allocated memory in the reverse
order of allocation before exiting the function in case of an error.
Fixes: bfe1d56 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Cc: [email protected]
Signed-off-by: Shuai Xue <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Fenghua Yu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>1 parent 46a5cca commit 90022b3
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
590 | 601 | | |
591 | 602 | | |
592 | 603 | | |
| |||
1255 | 1266 | | |
1256 | 1267 | | |
1257 | 1268 | | |
1258 | | - | |
| 1269 | + | |
1259 | 1270 | | |
1260 | 1271 | | |
1261 | 1272 | | |
| |||
0 commit comments