[PATCH 19/32] libxml: eliminate extra copy of string

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

Also, s/libxml/libxl/ in the summary

On a Sunday in 2020, Laine Stump wrote:
>libxlMakeNic was calling g_strdup(virBufferCurrentContent(&buf)) to
>make a copy of the buffer contents, and then later freeing the buffer
>without ever using it again. Instead of this extra strdup, just
>transfer ownership of the virBuffer's string with
>virBufferContentAndReset(), and be done with it.
>Signed-off-by: Laine Stump <laine at redhat.com>
> src/libxl/libxl_conf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

-------------- 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/224da9c5/attachment-0001.sig>

More information about the libvir-list mailing list