]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Simplify lifecycle of temp buffers in virDomainDefFormatFeatures
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Mar 2019 12:27:45 +0000 (13:27 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 6 Mar 2019 14:53:53 +0000 (15:53 +0100)
commitdc29a46777dc29f50f3b276c1f9b84965c600777
tree8d12441629a0b1d18abc050ac8d69e6fe8fecc27
parente0b3e4e11c0e14d90c1b94707abd85741cca7f17
conf: Simplify lifecycle of temp buffers in virDomainDefFormatFeatures

Use VIR_AUTOCLEAN to avoid leaking the buffer on error path and get rid
of resetting mid loop since virXMLFormatElement does the reset
internally.

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