Received: from eggs.gnu.org ([2001:4830:134:3::10]:36462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btyvK-0000r5-5D for qemu-devel@nongnu.org; Tue, 11 Oct 2016 11:24:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btyvJ-0006Kl-79 for qemu-devel@nongnu.org; Tue, 11 Oct 2016 11:24:58 -0400 From: Eric Blake Date: Tue, 11 Oct 2016 10:24:45 -0500 Message-Id: <1476199485-9008-1-git-send-email-eblake@redhat.com> In-Reply-To: <1476105837-9861-9-git-send-email-eblake@redhat.com> References: <1476105837-9861-9-git-send-email-eblake@redhat.com> Subject: [Qemu-devel] [PATCH v6 08.5/15] fixup! qstring: Add qstring_wrap_str() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, armbru@redhat.com, marcandre.lureau@gmail.com, Kevin Wolf , Max Reitz Signed-off-by: Eric Blake --- squash this in to address Marc-Andre's finding on a harmless extra g_free. --- block.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 16d5981..6f00fd4 100644 --- a/block.c +++ b/block.c @@ -1605,7 +1605,7 @@ static BlockDriverState *bdrv_append_temp_snapshot(BlockDriverState *bs, char *tmp_filename = g_malloc0(PATH_MAX + 1); int64_t total_size; QemuOpts *opts = NULL; - BlockDriverState *bs_snapshot; + BlockDriverState *bs_snapshot = NULL; int ret; /* if snapshot, we create a temporary backing file and open it @@ -1658,13 +1658,10 @@ static BlockDriverState *bdrv_append_temp_snapshot(BlockDriverState *bs, bdrv_ref(bs_snapshot); bdrv_append(bs_snapshot, bs); +out: + QDECREF(snapshot_options); g_free(tmp_filename); return bs_snapshot; - -out: - QDECREF(snapshot_options); - g_free(tmp_filename); - return NULL; } /* -- 2.7.4