Skip to content

Commit

Permalink
qemu-img: Fix leak
Browse files Browse the repository at this point in the history
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: d402b6a
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>
(cherry picked from commit 3ecd5a4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
XanClic authored and mdroth committed Apr 2, 2019
1 parent a36defa commit c192d40
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions qemu-img.c
Expand Up @@ -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);
Expand Down

0 comments on commit c192d40

Please sign in to comment.