btrfs-progs: let btrfs_free_path accept NULL

Same in kernel and matches semantics of free().

Resolves-Coverity-CID: 1054881
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2014-12-19 17:01:40 +01:00
parent c4ca5c5f3f
commit fb7ddc498f
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,8 @@ struct btrfs_path *btrfs_alloc_path(void)
void btrfs_free_path(struct btrfs_path *p)
{
if (!p)
return;
btrfs_release_path(p);
kfree(p);
}