]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: return early from failed memory allocations in ioctl handlers
authorShailendra Verma <shailendra.v@samsung.com>
Thu, 10 Nov 2016 09:47:41 +0000 (15:17 +0530)
committerDavid Sterba <dsterba@suse.com>
Wed, 30 Nov 2016 12:45:18 +0000 (13:45 +0100)
commita16bc5676537fc3e9501c0d82e0296ea93ac8ba8
tree031881988f2df5ae168ae4de777fe51688da2d7f
parent62a0c3aedbd7a14c6887c8dee31f1d07a3d1c431
btrfs: return early from failed memory allocations in ioctl handlers

There is no need to call kfree() if memdup_user() fails, as no memory
was allocated and the error in the error-valued pointer should be returned.

Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>
[ edit subject ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c