]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virt-host-validate: Initialize the error object
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 8 Jun 2021 06:53:14 +0000 (08:53 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 9 Jun 2021 06:21:52 +0000 (08:21 +0200)
commite7ae82dcc523d333933c90e20cdeb25d747ad1b3
treea997fd95cb105259340cb7ac46f244816ea6b8a7
parenta1909069776dbab0beff8d7bba1651c94f8a9cd5
virt-host-validate: Initialize the error object

Several libvirt functions are called from virt-host-validate.
Some of these functions do report an error on failure. But
reporting an error is coupled with freeing previous error (by
calling virResetError()). But we've never called
virErrorInitialize() and thus resetting error object frees some
random pointer.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
tools/virt-host-validate.c