[libvirt PATCH] conf: Initialize devAddr in virNodeDeviceGetPCIVPDDynamicCap

Otherwise devAddr.multi would be uninitialized. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/conf/node_device_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 61c8715037..eaa42c05ee 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -3018,7 +3018,7 @@ static int virNodeDeviceGetPCIVPDDynamicCap(virNodeDevCapPCIDev *devCapPCIDev) { g_autoptr(virPCIDevice) pciDev = NULL; - virPCIDeviceAddress devAddr; + virPCIDeviceAddress devAddr = {0}; g_autoptr(virPCIVPDResource) res = NULL; devAddr.domain = devCapPCIDev->domain; -- 2.35.0

On 2/11/22 13:39, Jiri Denemark wrote:
Otherwise devAddr.multi would be uninitialized.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/conf/node_device_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Oh, there are more places like this. But it's not something that a small spatch wouldn't solve. I'll post a follow up shortly. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal

On Fri, Feb 11, 2022 at 14:26:12 +0100, Michal Prívozník wrote:
On 2/11/22 13:39, Jiri Denemark wrote:
Otherwise devAddr.multi would be uninitialized.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/conf/node_device_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Oh, there are more places like this. But it's not something that a small spatch wouldn't solve. I'll post a follow up shortly.
OK, let's go with your patch which is a superset of this one. Jirka
participants (2)
-
Jiri Denemark
-
Michal Prívozník