aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2025-08-07 15:32:21 +0200
committerKostiantyn Kostiuk <kkostiuk@redhat.com>2025-09-01 14:02:18 +0300
commit42bdb911c22f9449f7a310efc73b70548ca42b24 (patch)
treea284e05b7b8bd0d7270e1e8732e4bd78176c7e33 /hw/intc
parent83f6dceb8f5c0a1efe806a9a4905cbc743a8a378 (diff)
downloadqemu-42bdb911c22f9449f7a310efc73b70548ca42b24.zip
qemu-42bdb911c22f9449f7a310efc73b70548ca42b24.tar.gz
qemu-42bdb911c22f9449f7a310efc73b70548ca42b24.tar.bz2
qga: fix potentially not initialized nr_volumes in qga_vss_fsfreeze()
In this function we could have this variable not initialized. If this could be acceptable on error, the variable could be left not initialized f.e. as follows: void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset) { ... if (mountpoints) { ... if (num_mount_points == 0) { /* If there is no valid mount points, just exit. */ goto out; } } ... if (!mountpoints) { ... if (num_fixed_drives == 0) { goto out; /* If there is no fixed drive, just exit. */ } } ... } Stay on safe side, initialize the variable at the beginning. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Kostiantyn Kostiuk <kkostiuk@redhat.com> CC: Michael Roth <michael.roth@amd.com> Reviewed-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250807133221.1135453-1-den@openvz.org Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'hw/intc')
0 files changed, 0 insertions, 0 deletions