]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use kfree() in btrfs_ioctl_get_subvol_info()
authorWaiman Long <longman@redhat.com>
Tue, 16 Jun 2020 15:31:59 +0000 (11:31 -0400)
committerDavid Sterba <dsterba@suse.com>
Tue, 16 Jun 2020 17:24:03 +0000 (19:24 +0200)
commit67f6445da323e45b3753613c22861dcea795b44d
treec73c266d76a14da8d3c1c04fad1473797054adca
parentf4e2f0ad53956dcffaea3fb3debc9e77f2aaafe9
btrfs: use kfree() in btrfs_ioctl_get_subvol_info()

In btrfs_ioctl_get_subvol_info(), there is a classic case where kzalloc()
was incorrectly paired with kzfree(). According to David Sterba, there
isn't any sensitive information in the subvol_info that needs to be
cleared before freeing. So kzfree() isn't really needed, use kfree()
instead.

Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c