Re: [PATCH] btrfs: only free root_path if it was allocated from the heap

2016-01-05 Thread David Sterba
On Thu, Dec 03, 2015 at 01:45:44PM -0500, Neil Horman wrote: > Noticed this while doing some snapshots in a chroot environment > > btrfs receive can set root_path to either realmnt, which is passed in from the > command line, or to a heap allocated via find_mount_root in do_receive. We > should

Re: [PATCH] btrfs: only free root_path if it was allocated from the heap

2016-01-05 Thread Neil Horman
On Tue, Jan 05, 2016 at 03:01:38PM +0100, David Sterba wrote: > On Thu, Dec 03, 2015 at 01:45:44PM -0500, Neil Horman wrote: > > Noticed this while doing some snapshots in a chroot environment > > > > btrfs receive can set root_path to either realmnt, which is passed in from > > the > > command

[PATCH] btrfs: only free root_path if it was allocated from the heap

2015-12-03 Thread Neil Horman
Noticed this while doing some snapshots in a chroot environment btrfs receive can set root_path to either realmnt, which is passed in from the command line, or to a heap allocated via find_mount_root in do_receive. We should only free the later, not the former, as the former results in an