mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
Fix tiny leak in qemu_opts_parse
qemu_opts_create duplicates the id we pass in case it shall be stored in the opts. So we do not need to dup it in qemu_opts_parse, leaking a few bytes this way. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
54eefd72bf
commit
d510c5cf34
1 changed files with 2 additions and 2 deletions
|
@ -763,10 +763,10 @@ QemuOpts *qemu_opts_parse(QemuOptsList *list, const char *params,
|
|||
|
||||
if (strncmp(params, "id=", 3) == 0) {
|
||||
get_opt_value(value, sizeof(value), params+3);
|
||||
id = qemu_strdup(value);
|
||||
id = value;
|
||||
} else if ((p = strstr(params, ",id=")) != NULL) {
|
||||
get_opt_value(value, sizeof(value), p+4);
|
||||
id = qemu_strdup(value);
|
||||
id = value;
|
||||
}
|
||||
opts = qemu_opts_create(list, id, 1);
|
||||
if (opts == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue