Commit 7f31cce
nommu: fix memory leak in do_mmap() error path
The preallocation of the maple tree nodes may leak if the error path to
"error_just_free" is taken. Fix this by moving the freeing of the maple
tree nodes to a shared location for all error paths.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 8220543 ("nommu: remove uses of VMA linked list")
Signed-off-by: Liam R. Howlett <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Yu Zhao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent bf61acb commit 7f31cce
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
| 1243 | + | |
1243 | 1244 | | |
1244 | 1245 | | |
1245 | 1246 | | |
| |||
1250 | 1251 | | |
1251 | 1252 | | |
1252 | 1253 | | |
1253 | | - | |
1254 | 1254 | | |
1255 | 1255 | | |
1256 | 1256 | | |
| |||
0 commit comments