On Tue, Sep 24, 2013 at 11:03 AM, Daniel P. Berrange
<berrange(a)redhat.com> wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
If qemuAddRBDHost fails due to parsing problems or OOM, then
qemuParseRBDString cleanup is skipped causing a memory leak.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu_command.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3296d09..bf07bdc 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3325,9 +3325,9 @@ static int qemuParseRBDString(virDomainDiskDefPtr disk)
break;
}
}
- if (qemuAddRBDHost(disk, h) < 0) {
- return -1;
- }
+ if (qemuAddRBDHost(disk, h) < 0)
+ goto error;
+
h = sep;
}
}
--
1.8.3.1
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
ACK
--
Doug Goldstein