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>
};
struct QemuOpts {
- const char *id;
+ char *id;
QemuOptsList *list;
QTAILQ_HEAD(QemuOptHead, QemuOpt) head;
QTAILQ_ENTRY(QemuOpts) next;
qemu_opt_del(opt);
}
QTAILQ_REMOVE(&opts->list->head, opts, next);
+ qemu_free(opts->id);
qemu_free(opts);
}