]> 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)
commitd279b150a7209c87a1c923a22d64a483dc96d072
treec73c266d76a14da8d3c1c04fad1473797054adca
parentbd4ff009ba0ae3caafe63c891b05f436c8b7b39d
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