Re: [PATCH 2/2] Btrfs: fix memory leak of pending_snapshot-inherit

2013-02-07 Thread Arne Jansen
On 02/07/13 07:02, Miao Xie wrote: The argument inherit of btrfs_ioctl_snap_create_transid() was assigned to NULL during we created the snapshots, so we didn't free it though we called kfree() in the caller. But since we are sure the snapshot creation is done after the function -

Re: [PATCH 2/2] Btrfs: fix memory leak of pending_snapshot-inherit

2013-02-07 Thread Alex Lyakas
Arne, Miao, I also agree that it is better to move this responsibility to create_pending_snapshot(). Alex. On Thu, Feb 7, 2013 at 10:43 AM, Arne Jansen sensi...@gmx.net wrote: On 02/07/13 07:02, Miao Xie wrote: The argument inherit of btrfs_ioctl_snap_create_transid() was assigned to NULL

Re: [PATCH 2/2] Btrfs: fix memory leak of pending_snapshot-inherit

2013-02-07 Thread Miao Xie
On Thu, 07 Feb 2013 09:43:47 +0100, Arne Jansen wrote: On 02/07/13 07:02, Miao Xie wrote: The argument inherit of btrfs_ioctl_snap_create_transid() was assigned to NULL during we created the snapshots, so we didn't free it though we called kfree() in the caller. But since we are sure the

Re: [PATCH 2/2] Btrfs: fix memory leak of pending_snapshot-inherit

2013-02-07 Thread Arne Jansen
On 02/07/13 10:28, Miao Xie wrote: On Thu, 07 Feb 2013 09:43:47 +0100, Arne Jansen wrote: On 02/07/13 07:02, Miao Xie wrote: The argument inherit of btrfs_ioctl_snap_create_transid() was assigned to NULL during we created the snapshots, so we didn't free it though we called kfree() in the

[PATCH 2/2] Btrfs: fix memory leak of pending_snapshot-inherit

2013-02-06 Thread Miao Xie
The argument inherit of btrfs_ioctl_snap_create_transid() was assigned to NULL during we created the snapshots, so we didn't free it though we called kfree() in the caller. But since we are sure the snapshot creation is done after the function - btrfs_ioctl_snap_create_transid() - completes, it