Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_process.c | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e2a3d87527..579b3c3713 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1105,24 +1105,20 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon G_GNUC_UNUSED,
return 0;
error:
- if (localAddr) {
- VIR_FREE(localAddr->service);
- VIR_FREE(localAddr->node);
- VIR_FREE(localAddr);
- }
- if (remoteAddr) {
- VIR_FREE(remoteAddr->service);
- VIR_FREE(remoteAddr->node);
- VIR_FREE(remoteAddr);
- }
- if (subject) {
- for (i = 0; i < subject->nidentity; i++) {
- VIR_FREE(subject->identities[i].type);
- VIR_FREE(subject->identities[i].name);
- }
- VIR_FREE(subject->identities);
- VIR_FREE(subject);
+ VIR_FREE(localAddr->service);
+ VIR_FREE(localAddr->node);
+ VIR_FREE(localAddr);
+
+ VIR_FREE(remoteAddr->service);
+ VIR_FREE(remoteAddr->node);
+ VIR_FREE(remoteAddr);
+
+ for (i = 0; i < subject->nidentity; i++) {
+ VIR_FREE(subject->identities[i].type);
+ VIR_FREE(subject->identities[i].name);
}
+ VIR_FREE(subject->identities);
+ VIR_FREE(subject);
return -1;
}
--
2.26.2