qemu: avoid memory leak

Leak introduced in commit 036ad50, affects only error case.

* src/qemu/qemu_command.c: fix memory leak.

Signed-off-by: Alex Jia <ajia@redhat.com>
This commit is contained in:
ajia@redhat.com 2011-09-19 00:36:11 +08:00 committed by Eric Blake
parent 2fdd441a4a
commit db3b32c4e1

View File

@ -6540,7 +6540,6 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
host = disk->src;
port = strchr(host, ':');
if (!port) {
def = NULL;
qemuReportError(VIR_ERR_INTERNAL_ERROR,
_("cannot parse nbd filename '%s'"), disk->src);
goto error;