Patchwork [8/8] fix QemuOpts leak

login
register
mail settings
Submitter Paolo Bonzini
Date Dec. 23, 2010, 12:42 p.m.
Message ID <1293108174-24895-9-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/76510/
State New
Headers show

Comments

Paolo Bonzini - Dec. 23, 2010, 12:42 p.m.
Now that no backend's open function saves the passed QemuOpts, fix a leak
in the qemu_chr_open backwards-compatible parser.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qemu-char.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/qemu-char.c b/qemu-char.c
index 7b61a62..b99b77b 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2555,6 +2555,7 @@  CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i
     if (chr && qemu_opt_get_bool(opts, "mux", 0)) {
         monitor_init(chr, MONITOR_USE_READLINE);
     }
+    qemu_opts_del(opts);
     return chr;
 }