]> xenbits.xensource.com Git - libvirt.git/commitdiff
vmx: use xmlBufferDetach() when applicable
authorJakub Palacky <jpalacky@redhat.com>
Thu, 12 Sep 2024 11:47:22 +0000 (13:47 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 12 Sep 2024 12:52:55 +0000 (14:52 +0200)
xmlBuffer->content was deprecated in libxml2 v2.13.0-33-gb34dc1e4
xmlBufferDetach(xmlBuffer) should be used instead

Signed-off-by: Jakub Palacky <jpalacky@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/vmx/vmx.c

index 227744d06258e942c81123bc0b2a3084f8aa9c8f..de16c1f6342c8c6f830a4013a08e813dd5ede172 100644 (file)
@@ -794,7 +794,7 @@ virVMXConvertToUTF8(const char *encoding, const char *string)
         goto cleanup;
     }
 
-    result = (char *)g_steal_pointer(&utf8->content);
+    result = (char *)xmlBufferDetach(utf8);
 
  cleanup:
     xmlCharEncCloseFunc(handler);