mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Use g_autoptr(qemuMonitorTest)
Instead of calling qemuMonitorTestFree() explicitly, we can use g_autoptr() and let it be called automagically. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
@@ -72,7 +72,7 @@ testQemuCaps(const void *opaque)
|
||||
testQemuData *data = (void *) opaque;
|
||||
g_autofree char *repliesFile = NULL;
|
||||
g_autofree char *capsFile = NULL;
|
||||
qemuMonitorTest *mon = NULL;
|
||||
g_autoptr(qemuMonitorTest) mon = NULL;
|
||||
g_autoptr(virQEMUCaps) capsActual = NULL;
|
||||
g_autofree char *binary = NULL;
|
||||
g_autofree char *actual = NULL;
|
||||
@@ -132,7 +132,6 @@ testQemuCaps(const void *opaque)
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
qemuMonitorTestFree(mon);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user