]> git.ipfire.org Git - thirdparty/libvirt.git/commit
remove redundant calls to virBufferFreeAndReset()
authorLaine Stump <laine@redhat.com>
Sat, 4 Jul 2020 22:09:21 +0000 (18:09 -0400)
committerLaine Stump <laine@redhat.com>
Wed, 8 Jul 2020 20:35:05 +0000 (16:35 -0400)
commit065f7d5ba9999edd16332b381139dbca1ebae140
tree90c5c61afb8a19681bb783616cde8a82543e62d3
parentf0f7ad14e9529b7a26602736761c42279d94ad34
remove redundant calls to virBufferFreeAndReset()

There are several calls to virBufferFreeAndReset() when functions
encounter an error, but the caller never uses the virBuffer once an
error has been encountered (all callers detect error by looking at the
function return value, not the contents of the virBuffer being
operated on), and now that all virBuffers are auto-freed there is no
reason for the lower level functions like these to spend time freeing
a buffer that is guaranteed to be freed momentarily anyway.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/checkpoint_conf.c
src/conf/domain_conf.c
src/conf/snapshot_conf.c
src/libxl/xen_xl.c
src/util/virsysinfo.c
src/util/virxml.c