]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu conf: Use virBufferFreeAndReset instead of virBufferContentAndReset and VIR_FREE
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 30 Jan 2010 16:27:05 +0000 (17:27 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 4 Feb 2010 18:09:28 +0000 (19:09 +0100)
src/conf/cpu_conf.c

index e7924c1e16a4404c503a5fdba617f9c9edcac4e4..244d670a646a29ae0474800cf177edcfdf573b3d 100644 (file)
@@ -249,7 +249,6 @@ virCPUDefFormat(virConnectPtr conn,
                 int flags)
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
-    char *tmp;
 
     if (virCPUDefFormatBuf(conn, &buf, def, indent, flags) < 0)
         goto cleanup;
@@ -262,8 +261,7 @@ virCPUDefFormat(virConnectPtr conn,
 no_memory:
     virReportOOMError(conn);
 cleanup:
-    tmp = virBufferContentAndReset(&buf);
-    VIR_FREE(tmp);
+    virBufferFreeAndReset(&buf);
     return NULL;
 }