• David Sterba's avatar
    btrfs: fix leak of path in btrfs_find_item · 381cf658
    David Sterba authored
    If btrfs_find_item is called with NULL path it allocates one locally but
    does not free it. Affected paths are inserting an orphan item for a file
    and for a subvol root.
    
    Move the path allocation to the callers.
    
    CC: <stable@vger.kernel.org> # 3.14+
    Fixes: 3f870c28 ("btrfs: expand btrfs_find_item() to include find_orphan_item functionality")
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
    381cf658
tree-log.c 120 KB