Skip to content
Snippets Groups Projects
Commit b09417b9 authored by Jan Kiszka's avatar Jan Kiszka Committed by Anthony Liguori
Browse files

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: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 90697be8
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment