[PATCH 18/32] remove redundant calls to virBufferFreeAndReset()

Ján Tomko jtomko at redhat.com
Wed Jul 8 11:17:29 UTC 2020


On a Sunday in 2020, Laine Stump wrote:
>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 at redhat.com>
>---
> src/conf/checkpoint_conf.c | 1 -
> src/conf/domain_conf.c     | 1 -
> src/conf/snapshot_conf.c   | 1 -
> src/libxl/xen_xl.c         | 1 -
> src/util/virsysinfo.c      | 1 -
> src/util/virxml.c          | 1 -
> 6 files changed, 6 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200708/dc23df93/attachment-0001.sig>


More information about the libvir-list mailing list