forked from Mirrors/btrfs-progs
btrfs-progs: clear_extent_bits: Fix memory leak.
The 'prealloc' extent_state structure is leaked for the case when the 'desired range' encapsulates/covers the 'extent range'. Signed-off-by: chandan <chandan@linux.vnet.ibm.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>master
parent
1b10eaa8e1
commit
120e27d76f
|
@ -210,9 +210,11 @@ int clear_extent_bits(struct extent_io_tree *tree, u64 start,
|
||||||
int set = 0;
|
int set = 0;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
prealloc = alloc_extent_state();
|
if (!prealloc) {
|
||||||
if (!prealloc)
|
prealloc = alloc_extent_state();
|
||||||
return -ENOMEM;
|
if (!prealloc)
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this search will find the extents that end after
|
* this search will find the extents that end after
|
||||||
|
|
Loading…
Reference in New Issue