From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPsFT-0001kq-3G for qemu-devel@nongnu.org; Thu, 22 Nov 2018 11:54:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPsFR-0000rN-Dz for qemu-devel@nongnu.org; Thu, 22 Nov 2018 11:54:39 -0500 From: Kevin Wolf Date: Thu, 22 Nov 2018 17:54:09 +0100 Message-Id: <20181122165417.23894-6-kwolf@redhat.com> In-Reply-To: <20181122165417.23894-1-kwolf@redhat.com> References: <20181122165417.23894-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 05/13] qemu-img: Fix leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org From: Max Reitz 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: d402b6a21a825a5c07aac9251990860723d49f5d Reported-by: Kevin Wolf Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- qemu-img.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-img.c b/qemu-img.c index a9a2470e1a..ad04f59565 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -263,6 +263,7 @@ static int print_block_option_help(const char *filena= me, const char *fmt) if (!proto_drv->create_opts) { error_report("Protocol driver '%s' does not support image cr= eation", proto_drv->format_name); + qemu_opts_free(create_opts); return 1; } create_opts =3D qemu_opts_append(create_opts, proto_drv->create_= opts); --=20 2.19.1