From nobody Sat Feb 7 05:56:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=yandex-team.ru Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528530954505223.9948557045676; Sat, 9 Jun 2018 00:55:54 -0700 (PDT) Received: from localhost ([::1]:39366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRYj3-0005dF-TS for importer@patchew.org; Sat, 09 Jun 2018 03:55:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRYgN-00044r-H3 for qemu-devel@nongnu.org; Sat, 09 Jun 2018 03:53:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRYgK-0002vp-FU for qemu-devel@nongnu.org; Sat, 09 Jun 2018 03:53:07 -0400 Received: from forwardcorp1g.cmail.yandex.net ([87.250.241.190]:38704) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRYgK-0002tX-7p for qemu-devel@nongnu.org; Sat, 09 Jun 2018 03:53:04 -0400 Received: from smtpcorp1o.mail.yandex.net (smtpcorp1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::30]) by forwardcorp1g.cmail.yandex.net (Yandex) with ESMTP id B08D72171E; Sat, 9 Jun 2018 10:53:01 +0300 (MSK) Received: from smtpcorp1o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtpcorp1o.mail.yandex.net (Yandex) with ESMTP id A98402440E01; Sat, 9 Jun 2018 10:53:01 +0300 (MSK) Received: from unknown (unknown [2a02:6b8:0:40c:44f:e5a2:2148:4fca]) by smtpcorp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IKrD4Nr5zs-r1umA6GR; Sat, 09 Jun 2018 10:53:01 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1528530781; bh=jnRng46MyzxYjAScMocJUzyU7XT8lt4TJb19KAXPSDQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=1ESoxAnSeUabjB4O7bkHLgLJrq0C8rH1hvN9Ydu0os3YPxWoYgbqb9xW8ngizqsbt f+CZGWW+IjXJYtwoL+BGSjLFgcc9m8MxP9IsHu5lveTOzT01CvTIuXIIZrN6YtWxQY sPzGmUNTvTuNeNi86d56L3ycHncz8v/3aZoWq4CA= Authentication-Results: smtpcorp1o.mail.yandex.net; dkim=pass header.i=@yandex-team.ru From: Dima Stepanov To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 10:52:43 +0300 Message-Id: <1528530764-21376-3-git-send-email-dimastep@yandex-team.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528530764-21376-1-git-send-email-dimastep@yandex-team.ru> References: <1528530764-21376-1-git-send-email-dimastep@yandex-team.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 87.250.241.190 Subject: [Qemu-devel] [PATCH v1 2/3] qcow2: fix the uninitialized bitmap_table variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dimastep@yandex-team.ru, wrfsh@yandex-team.ru Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The free_bitmap_clusters() routine is using the bitmap_table_load() call to initialize the local bitmap_table variable. bitmap_table_load() doesn't initialize variable to NULL in case of error. As a result a following assert will be hit: assert(bitmap_table =3D=3D NULL); Remove this assert, since the next instruction is return from routine. Signed-off-by: Dima Stepanov --- block/qcow2-bitmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 60d5290..69485aa 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -254,7 +254,6 @@ static int free_bitmap_clusters(BlockDriverState *bs, Q= cow2BitmapTable *tb) =20 ret =3D bitmap_table_load(bs, tb, &bitmap_table); if (ret < 0) { - assert(bitmap_table =3D=3D NULL); return ret; } =20 --=20 2.7.4