diff options
author | John Ferlan <jferlan@redhat.com> | 2015-04-28 06:32:52 -0400 |
---|---|---|
committer | John Ferlan <jferlan@redhat.com> | 2015-04-28 06:33:49 -0400 |
commit | b515339fe79f09b90dcdaf57ef5060cd4c4c5764 (patch) | |
tree | 5b137535b46f6095bc8ba8216e7b92fe3d184d89 | |
parent | 69b16513a5c5f2e9a0d269b659fa55ff6d6e8267 (diff) | |
download | libvirt-b515339fe79f09b90dcdaf57ef5060cd4c4c5764.tar.gz |
qemu: Remove need for qemuMonitorIOThreadInfoFree
Replace with just VIR_FREE.
-rw-r--r-- | src/qemu/qemu_driver.c | 6 | ||||
-rw-r--r-- | src/qemu/qemu_monitor.c | 9 | ||||
-rw-r--r-- | src/qemu/qemu_monitor.h | 2 | ||||
-rw-r--r-- | src/qemu/qemu_monitor_json.c | 2 | ||||
-rw-r--r-- | src/qemu/qemu_process.c | 2 | ||||
-rw-r--r-- | tests/qemumonitorjsontest.c | 2 |
6 files changed, 6 insertions, 17 deletions
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d0147e9603..80463f20d0 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5950,7 +5950,7 @@ qemuDomainGetIOThreadsLive(virQEMUDriverPtr driver, } if (iothreads) { for (i = 0; i < niothreads; i++) - qemuMonitorIOThreadInfoFree(iothreads[i]); + VIR_FREE(iothreads[i]); VIR_FREE(iothreads); } @@ -6330,7 +6330,7 @@ qemuDomainHotplugAddIOThread(virQEMUDriverPtr driver, cleanup: if (new_iothreads) { for (idx = 0; idx < new_niothreads; idx++) - qemuMonitorIOThreadInfoFree(new_iothreads[idx]); + VIR_FREE(new_iothreads[idx]); VIR_FREE(new_iothreads); } VIR_FREE(mem_mask); @@ -6416,7 +6416,7 @@ qemuDomainHotplugDelIOThread(virQEMUDriverPtr driver, cleanup: if (new_iothreads) { for (idx = 0; idx < new_niothreads; idx++) - qemuMonitorIOThreadInfoFree(new_iothreads[idx]); + VIR_FREE(new_iothreads[idx]); VIR_FREE(new_iothreads); } virDomainAuditIOThread(vm, orig_niothreads, new_niothreads, diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 48bfeb0956..6be3ca28b9 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3813,15 +3813,6 @@ qemuMonitorGetIOThreads(qemuMonitorPtr mon, } -void -qemuMonitorIOThreadInfoFree(qemuMonitorIOThreadInfoPtr iothread) -{ - if (!iothread) - return; - VIR_FREE(iothread); -} - - /** * qemuMonitorGetMemoryDeviceInfo: * @mon: pointer to the monitor diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index bce8031f4c..a07e43b899 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -883,8 +883,6 @@ struct _qemuMonitorIOThreadInfo { int qemuMonitorGetIOThreads(qemuMonitorPtr mon, qemuMonitorIOThreadInfoPtr **iothreads); -void qemuMonitorIOThreadInfoFree(qemuMonitorIOThreadInfoPtr iothread); - typedef struct _qemuMonitorMemoryDeviceInfo qemuMonitorMemoryDeviceInfo; typedef qemuMonitorMemoryDeviceInfo *qemuMonitorMemoryDeviceInfoPtr; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index c02ef47d2d..e2811405c6 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -6518,7 +6518,7 @@ qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon, cleanup: if (ret < 0 && infolist) { for (i = 0; i < n; i++) - qemuMonitorIOThreadInfoFree(infolist[i]); + VIR_FREE(infolist[i]); VIR_FREE(infolist); } virJSONValueFree(cmd); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d8a747c9b4..605b3c62d0 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2265,7 +2265,7 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, cleanup: if (iothreads) { for (i = 0; i < niothreads; i++) - qemuMonitorIOThreadInfoFree(iothreads[i]); + VIR_FREE(iothreads[i]); VIR_FREE(iothreads); } return ret; diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 39eeaa7bfb..c6379b643a 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2295,7 +2295,7 @@ testQemuMonitorJSONGetIOThreads(const void *data) cleanup: qemuMonitorTestFree(test); for (i = 0; i < ninfo; i++) - qemuMonitorIOThreadInfoFree(info[i]); + VIR_FREE(info[i]); VIR_FREE(info); return ret; |