]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vboxDomainScreenshot: Don't pass uninitialized 'screenData' to VIR_FREE
authorPeter Krempa <pkrempa@redhat.com>
Thu, 11 Jun 2020 08:38:05 +0000 (10:38 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 15 Jun 2020 08:27:37 +0000 (10:27 +0200)
commit515e62b32b623325e8c4f7760c5bccaef0972b4a
tree33c6fc411b1d182afcdea10137a8236eaa62a3db
parent94f26f01bdff168cf13fbe9caa85b0c4031ff541
vboxDomainScreenshot: Don't pass uninitialized 'screenData' to VIR_FREE

If one of the early checks to get screen resolution fails 'screenData'
would be passed to VIR_FREE uninitialized. Unfortunately the compiler
isn't able to detect this when VIR_FREE is implemented using
g_clear_pointer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com
src/vbox/vbox_common.c