]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemumonitortestutils: Add VIR_AUTOPTR support
authorEric Blake <eblake@redhat.com>
Tue, 11 Jun 2019 03:01:08 +0000 (22:01 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 12 Jun 2019 01:53:50 +0000 (20:53 -0500)
Upcoming tests are going to use VIR_AUTOPTR to simplify test cleanup.

Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
tests/qemumonitortestutils.h

index 8461c80caa9e000de6951e9cb58f4b216568464a..a2d2d3082001ef0329290cb1c5f03eb5a5e4e585 100644 (file)
@@ -24,6 +24,7 @@
 # include "qemu/qemu_conf.h"
 # include "qemu/qemu_monitor.h"
 # include "qemu/qemu_agent.h"
+# include "virautoclean.h"
 
 typedef struct _qemuMonitorTest qemuMonitorTest;
 typedef qemuMonitorTest *qemuMonitorTestPtr;
@@ -102,4 +103,6 @@ qemuMonitorPtr qemuMonitorTestGetMonitor(qemuMonitorTestPtr test);
 qemuAgentPtr qemuMonitorTestGetAgent(qemuMonitorTestPtr test);
 virDomainObjPtr qemuMonitorTestGetDomainObj(qemuMonitorTestPtr test);
 
+VIR_DEFINE_AUTOPTR_FUNC(qemuMonitorTest, qemuMonitorTestFree);
+
 #endif /* LIBVIRT_QEMUMONITORTESTUTILS_H */