mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemu: monitor: use VIR_AUTOFREE in qemuMonitor*VideoSize
Signed-off-by: Ján Tomko <jtomko@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
86d648f2c9
commit
8eacdff4c8
@ -1205,7 +1205,7 @@ qemuMonitorUpdateVideoMemorySize(qemuMonitorPtr mon,
|
||||
const char *videoName)
|
||||
{
|
||||
int ret = -1;
|
||||
char *path = NULL;
|
||||
VIR_AUTOFREE(char *) path = NULL;
|
||||
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
@ -1219,9 +1219,7 @@ qemuMonitorUpdateVideoMemorySize(qemuMonitorPtr mon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = qemuMonitorJSONUpdateVideoMemorySize(mon, video, path);
|
||||
VIR_FREE(path);
|
||||
return ret;
|
||||
return qemuMonitorJSONUpdateVideoMemorySize(mon, video, path);
|
||||
}
|
||||
|
||||
|
||||
@ -1237,7 +1235,7 @@ qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon,
|
||||
const char *videoName)
|
||||
{
|
||||
int ret = -1;
|
||||
char *path = NULL;
|
||||
VIR_AUTOFREE(char *) path = NULL;
|
||||
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
@ -1251,9 +1249,7 @@ qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = qemuMonitorJSONUpdateVideoVram64Size(mon, video, path);
|
||||
VIR_FREE(path);
|
||||
return ret;
|
||||
return qemuMonitorJSONUpdateVideoVram64Size(mon, video, path);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user