diff --git a/ctree.c b/ctree.c index bd6cb125..589efa3d 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); }