mirror of https://github.com/xemu-project/xemu.git
qemu-img: Fix leak
create_opts was leaked here. This is not too bad since the process is
about to exit anyway, but relying on that does not make the code nicer
to read.
Fixes: d402b6a21a
Reported-by: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
f0998879e0
commit
3ecd5a4f19
|
@ -263,6 +263,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
|
|||
if (!proto_drv->create_opts) {
|
||||
error_report("Protocol driver '%s' does not support image creation",
|
||||
proto_drv->format_name);
|
||||
qemu_opts_free(create_opts);
|
||||
return 1;
|
||||
}
|
||||
create_opts = qemu_opts_append(create_opts, proto_drv->create_opts);
|
||||
|
|
Loading…
Reference in New Issue