mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
qemu: fix memleaks in qemuBuildCommandLine
free boot_opts_str and boot_order_str both in normal and error paths. Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
This commit is contained in:
parent
6fabe2f227
commit
0a8bd97afa
@ -9266,6 +9266,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
}
|
||||
}
|
||||
VIR_FREE(boot_opts_str);
|
||||
VIR_FREE(boot_order_str);
|
||||
|
||||
if (def->os.kernel)
|
||||
virCommandAddArgList(cmd, "-kernel", def->os.kernel, NULL);
|
||||
@ -10746,6 +10747,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
|
||||
error:
|
||||
VIR_FREE(boot_order_str);
|
||||
VIR_FREE(boot_opts_str);
|
||||
virBufferFreeAndReset(&boot_buf);
|
||||
virObjectUnref(cfg);
|
||||
/* free up any resources in the network driver
|
||||
|
Loading…
Reference in New Issue
Block a user