mirror of https://gitee.com/openkylin/libvirt.git
virCHProcessUpdateInfo: Automatically free virJSONValue
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
8fe1d5d4c9
commit
f3febf9718
|
@ -121,15 +121,13 @@ virCHProcessUpdateConsole(virDomainObj *vm,
|
|||
static int
|
||||
virCHProcessUpdateInfo(virDomainObj *vm)
|
||||
{
|
||||
virJSONValue *info;
|
||||
g_autoptr(virJSONValue) info = NULL;
|
||||
virCHDomainObjPrivate *priv = vm->privateData;
|
||||
if (virCHMonitorGetInfo(priv->monitor, &info) < 0)
|
||||
return -1;
|
||||
|
||||
virCHProcessUpdateConsole(vm, info);
|
||||
|
||||
virJSONValueFree(info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue