On 12/19/14 10:06 AM, David Sterba wrote:
> Same in kernel and matches semantics of free().
>
> Resolves-Coverity-CID: 1054881
> Signed-off-by: David Sterba <dsterba@xxxxxxx>
Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> ctree.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/ctree.c b/ctree.c
> index bd6cb125b2a2..589efa3db17e 100644
> --- a/ctree.c
> +++ b/ctree.c
> @@ -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);
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html