mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
Btrfs: fix page leakage
Alloc_dummy_extent_buffer will not free the first page in the eb array if we fail to allocate a page, fix this. Thanks, Reported-by: David Sterba <dave@jikos.cz> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
parent
4804b38293
commit
f60b1b49f6
1 changed files with 1 additions and 1 deletions
|
@ -4104,7 +4104,7 @@ struct extent_buffer *alloc_dummy_extent_buffer(u64 start, unsigned long len)
|
|||
|
||||
return eb;
|
||||
err:
|
||||
for (i--; i > 0; i--)
|
||||
for (i--; i >= 0; i--)
|
||||
__free_page(eb->pages[i]);
|
||||
__free_extent_buffer(eb);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue