On Wed, Jan 13, 2016 at 08:33:17AM +0800, Qu Wenruo wrote:
>
>
> David Sterba wrote on 2016/01/12 11:17 +0100:
> > On Tue, Dec 01, 2015 at 03:11:37PM +0800, Qu Wenruo wrote:
> >> --- a/extent-tree.c
> >> +++ b/extent-tree.c
> >> +static int __btrfs_record_file_extent(struct btrfs_trans_handle *trans,
> >> + struct btrfs_root *root, u64 objectid,
> >> + struct btrfs_inode_item *inode,
> >> + u64 file_pos, u64 disk_bytenr,
> >> + u64 *ret_num_bytes)
> >> {
> >> int ret;
> >> struct btrfs_fs_info *info = root->fs_info;
> > ...
> >> @@ -3999,25 +4003,80 @@ int btrfs_record_file_extent(struct btrfs_trans_handle *trans,
> >> return ret;
> >> }
> >>
> >> - btrfs_init_path(&path);
> >> + path = btrfs_alloc_path();
> >> + if (!path)
> >> + return -ENOMEM;
> >> +
> > ...
> >> fail:
> >> - btrfs_release_path(&path);
> >> + btrfs_release_path(path);
> >> + return ret;
> >
> > Coverity correctly complains that path leaks here.
>
> Oh, I should use btrfs_free_path().
>
> Should I rebase the unmerged to patches to current devel and send it again?
Please hold on until 4.4 is released (at most a few days from now).
--
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