mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
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
|
static int
|
||||||
virCHProcessUpdateInfo(virDomainObj *vm)
|
virCHProcessUpdateInfo(virDomainObj *vm)
|
||||||
{
|
{
|
||||||
virJSONValue *info;
|
g_autoptr(virJSONValue) info = NULL;
|
||||||
virCHDomainObjPrivate *priv = vm->privateData;
|
virCHDomainObjPrivate *priv = vm->privateData;
|
||||||
if (virCHMonitorGetInfo(priv->monitor, &info) < 0)
|
if (virCHMonitorGetInfo(priv->monitor, &info) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
virCHProcessUpdateConsole(vm, info);
|
virCHProcessUpdateConsole(vm, info);
|
||||||
|
|
||||||
virJSONValueFree(info);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user