]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Illumos#16463 zfs_ioc_recv leaks nvlist
authorAndy Fiddaman <illumos@fiddaman.net>
Thu, 11 Apr 2024 21:38:22 +0000 (22:38 +0100)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2024 21:38:22 +0000 (14:38 -0700)
commit44f337be30e1502b32c8d381344044f15dd34674
tree28a89aed92242d21f8e01a8850640c79709a6663
parente5ddecd1a7e33bc341e7b5e8dd25d2fe478de8f2
Illumos#16463 zfs_ioc_recv leaks nvlist

In https://www.illumos.org/issues/16463 it was observed that
an nvlist was being leaked in zfs_ioc_recv() due a missing
call to nvlist_free for "hidden_args".
For OpenZFS the same issue exists in zfs_ioc_recv_new() and
is addressed by this PR.

This change also properly frees nvlists in the unlikely
event that a call to get_nvlist() fails.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Andy Fiddaman <illumos@fiddaman.net>
Closes #16077
module/zfs/zfs_ioctl.c