Commit 55e565c
dm-integrity: fix a memory leak when rechecking the data
Memory for the "checksums" pointer will leak if the data is rechecked
after checksum failure (because the associated kfree won't happen due
to 'goto skip_io').
Fix this by freeing the checksums memory before recheck, and just use
the "checksum_onstack" memory for storing checksum during recheck.
Fixes: c88f5e5 ("dm-integrity: recheck the integrity tag after a failure")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>1 parent 277100b commit 55e565c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
| 1851 | + | |
| 1852 | + | |
1851 | 1853 | | |
1852 | | - | |
| 1854 | + | |
1853 | 1855 | | |
1854 | 1856 | | |
1855 | | - | |
1856 | | - | |
1857 | 1857 | | |
1858 | 1858 | | |
1859 | 1859 | | |
| |||
0 commit comments