]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix an nvpair leak in vdev_geom_read_config().
authormarkj <markj@FreeBSD.org>
Mon, 17 Sep 2018 16:16:57 +0000 (16:16 +0000)
committermarkj <markj@FreeBSD.org>
Mon, 17 Sep 2018 16:16:57 +0000 (16:16 +0000)
commit290cf1ad13eee7239d661252cdf5434d7320f4a7
tree87a2809fa4b8dfeb64b2881c2bbb6ab9acfa28eb
parent7adf4335d8678820ba6f372e0f63b4e3aa4dbf57
Fix an nvpair leak in vdev_geom_read_config().

Also change the behaviour slightly: instead of freeing "config" if the
last nvlist doesn't pass the tests, return the last config that did pass
those tests.  This matches the comment at the beginning of the function.

PR: 230704
Diagnosed by: avg
Reviewed by: asomers, avg
Tested by: Mark Martinec <Mark.Martinec@ijs.si>
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D17202
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c