]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Correctly initialize libvirt
authorJiri Denemark <jdenemar@redhat.com>
Mon, 9 May 2011 11:57:09 +0000 (13:57 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 17 May 2011 10:37:30 +0000 (12:37 +0200)
commitc256542e764833346b2f97dfd3af0a63144e8115
tree45a18f83f9a8f5beef74f28c7a83fdd732f8c10d
parenta39376016ae512feb64a9765c0236fe273fa5855
virsh: Correctly initialize libvirt

virsh didn't call virInitialize(), which (among other things)
initializes virLastErr thread local variable. As a result of that, virsh
could just segfault in virEventRegisterDefaultImpl() since that is the
first call that touches (resets) virLastErr.

I have no idea what lucky coincidence made this bug visible but I was
able to reproduce it in 100% cases but only in one specific environment
which included building in sandbox.
src/libvirt.c
tools/virsh.c