diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-12-01 15:24:18 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 11:45:49 -0600 |
commit | b09417b9bcbde787a03cf38608cb897a52f12dd5 (patch) | |
tree | 352c583c1b1958224126519fb59946df93878806 | |
parent | 90697be8896ce364456b81d3ba7eaadd10b1766e (diff) |
qemu-opts: Release id on deletion
The opts id is always allocated via qemu_strdup, so it need not be
const, but it has to be released on opts deletion.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | qemu-option.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-option.c b/qemu-option.c index 49efd392d9..b009109009 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -481,7 +481,7 @@ struct QemuOpt { }; struct QemuOpts { - const char *id; + char *id; QemuOptsList *list; QTAILQ_HEAD(QemuOptHead, QemuOpt) head; QTAILQ_ENTRY(QemuOpts) next; @@ -686,6 +686,7 @@ void qemu_opts_del(QemuOpts *opts) qemu_opt_del(opt); } QTAILQ_REMOVE(&opts->list->head, opts, next); + qemu_free(opts->id); qemu_free(opts); } |