]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: def: Avoid unnecessary allocation of 'perf' events definition
authorPeter Krempa <pkrempa@redhat.com>
Tue, 28 Jun 2016 12:37:29 +0000 (14:37 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 30 Jun 2016 13:07:44 +0000 (15:07 +0200)
commitd7c40d50d721f5e34522efc57c4c4537721602c2
treecee195fca21c327f2bf7c04d82c150e81e2f8792
parent60a545fa685c1083cb1a430ece2a0f8fabc0586a
conf: def: Avoid unnecessary allocation of 'perf' events definition

Some code paths already assume that it is allocated since it was always
allocated by virDomainPerfDefParseXML. Make it member of virDomainDef
directly so that we don't have to allocate it all the time.

This fixes crash when attempting to connect to an existing process via
virDomainQemuAttach since we would not allocate it in that code path.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1350688
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c