提交 b2f27e44 编写于 作者: M Max Reitz 提交者: Stefan Hajnoczi

qemu-img: Fix insignificant memleak

As soon as options is set in img_amend(), it needs to be freed before
the function returns. This leak is rather insignificant, as qemu-img
will exit subsequently anyway, but there's no point in not fixing it.
Signed-off-by: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NBenoit Canet <benoit@irqsave.net>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NBenoît Canet <benoit.canet@nodalink.com>
Message-id: 1414404776-4919-4-git-send-email-mreitz@redhat.com
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 76a3a34d
......@@ -2948,7 +2948,9 @@ static int img_amend(int argc, char **argv)
}
if (optind != argc - 1) {
error_exit("Expecting one image file name");
error_report("Expecting one image file name");
ret = -1;
goto out;
}
flags = BDRV_O_FLAGS | BDRV_O_RDWR;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册