提交 376b311d 编写于 作者: M Matthias Bolte

cpu conf: Use virBufferFreeAndReset instead of virBufferContentAndReset and VIR_FREE

上级 b1cd474c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册