]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/spa.c
Call nvlist_free before return
authorFinix1979 <yanchongwen@hotmail.com>
Thu, 7 Jul 2022 18:43:58 +0000 (02:43 +0800)
committerGitHub <noreply@github.com>
Thu, 7 Jul 2022 18:43:58 +0000 (11:43 -0700)
commitcb01da68057dcb9e612e8d2e97d058c46c3574af
treeb278f6b08814cd3556839717ce6ef2b1706cd7c0
parent74230a5bc1be6e5e84a5f41b26f6f65a155078f0
Call nvlist_free before return

Fixes a small kernel memory leak which would occur if a pool failed
to import because the `DMU_POOL_VDEV_ZAP_MAP` key can't be read from
a presumably damaged MOS config.  In the case of a missing key there
was no leak.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Finix1979 <yancw@info2soft.com>
Closes #13629
module/zfs/spa.c