]> git.ipfire.org Git - thirdparty/libvirt.git/commit
node_device_conf: Avoid memleak in virNodeDeviceGetPCIVPDDynamicCap()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 30 Nov 2022 13:53:21 +0000 (14:53 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 1 Dec 2022 07:38:01 +0000 (08:38 +0100)
commit64d32118540aca3d42bc5ee21c8b780cafe04bfa
tree8efa92424c68bb812654b45db71546dbc371d5d4
parent93b9e6503e13cb6243d3af55ae4b304397f40d74
node_device_conf: Avoid memleak in virNodeDeviceGetPCIVPDDynamicCap()

The virNodeDeviceGetPCIVPDDynamicCap() function is called from
virNodeDeviceGetPCIDynamicCaps() and therefore has to be a wee
bit more clever about adding VPD capability. Namely, it has to
remove the old one before adding a new one. This is how other
functions called from virNodeDeviceGetPCIDynamicCaps() behave
as well.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143235
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/node_device_conf.c