From nobody Sun Nov 24 10:49:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1723453083; cv=pass; d=zohomail.com; s=zohoarc; b=doq/dGBj5APPt08FQVlH5vghQ16Zj+7MBdsH8pGS2O4bHLa5SXaZuklfnvWomrWGwceUcZrgL5y3gRFYGwK1qyb80pdQ6cI8S4m4CU4a5ba8ufFwHQgkUI9bdVEX6+qckARY8/RZfAUW+CSflMddITMEUU5qyQkoTOcioW+P4Bk= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723453083; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9u1UV+WAqhvtHe8BdKZ8IqkkHnjk6HNO2FxwWip1FLw=; b=BDjTxPhD+6Vj2iKIIWT9MCP8J88A+W0L49EnMHHc6yzhEGq7/41tPsNv0FSxY0umoaNxWK4scxZfjMCWt25poEoSdsJ+s9BO9YAZUJH/lPnxa0ZBmqicu2OxGpWR7yfanXAXBzlf7dfxijr0RLdvspaYIweUv4nPknohfID8Mis= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723453083580593.7911896299734; Mon, 12 Aug 2024 01:58:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdQs8-0003lN-N0; Mon, 12 Aug 2024 04:57:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdQs1-0003Qs-Bm for qemu-devel@nongnu.org; Mon, 12 Aug 2024 04:57:41 -0400 Received: from mail-vi1eur03on20713.outbound.protection.outlook.com ([2a01:111:f403:260c::713] helo=EUR03-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdQrz-0007iH-KS for qemu-devel@nongnu.org; Mon, 12 Aug 2024 04:57:41 -0400 Received: from VI0PR08MB10743.eurprd08.prod.outlook.com (2603:10a6:800:205::19) by DB5PR08MB10253.eurprd08.prod.outlook.com (2603:10a6:10:4a9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.13; Mon, 12 Aug 2024 08:57:34 +0000 Received: from VI0PR08MB10743.eurprd08.prod.outlook.com ([fe80::cebf:31ab:1e25:cfb5]) by VI0PR08MB10743.eurprd08.prod.outlook.com ([fe80::cebf:31ab:1e25:cfb5%5]) with mapi id 15.20.7875.012; Mon, 12 Aug 2024 08:57:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k0JNXapm63hbLjXVZMrSFW40H1j285wiXSLtxopRyJuIol+0wUKaYsk/iOelP04nV9HbGXCjvxtG/fUzlGE/3QphDWU4O4NQ3GT/qSgpLBsEbq7Qoc2ZuVAceQ64coqjWaLdfm9sALf7hlA0Y02CU62NfUmCB5/i2oHhe+GOccTNCfX960dIWrprsSHvniDMa8B/FX34AFwpIXREf46GCvOZkzChT3ecBZvVUm99BGMUJNw/Lis7sU0urM64Xq6uU94mYnrjw+lOFNs9IaTanRrv4rAHhG9TQlS5W21vKObSX+cmgPlwTZCe+q283waFsstZEKvgrGEj5rGF0AnfzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9u1UV+WAqhvtHe8BdKZ8IqkkHnjk6HNO2FxwWip1FLw=; b=jE29C4axYQMPLp3QHdmseuq3n8kTqOYPvJaBbs6L9NaOT20E8vGiN9zdy7MGaDLRV+s4NJ0Ooa8rFA5Gn7GDZnsvEC5QqIYTlUN/TO6LH6TIDxvbRd5AneHwXYO73KjuKJAhWdVUI/Bg0HUbIPEuL23i1G0pDIDRYdQc3kvo4vzRHmRPtVdY+xBcSQIumKrrE3UEtnrfvN0iLV3vJsMsMV5EIPtUimEUiMB3cd1OGZjf/np3pJu8BwW+ZvIpXkrw1Bju/EkxQ7pgpUw8nZf4JWEXXWeBA89xFYNMyZTC5Z3ZkDSs4u8GaTb2pm6QUKzPKxg34nITnc5gqF3LrScucQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9u1UV+WAqhvtHe8BdKZ8IqkkHnjk6HNO2FxwWip1FLw=; b=hzp9quNyBZ3ropyenNMpN37E8Z2aUT1k5glmCk7HuDvMM4IlNW8fUCR4GQlzMFpfF67anD83JZdKTU/tAoGba044vAEDnf+q6kXg+8azi0rbe6y23FhYLyERZk+0qwpIb4zT/vOx/JSOJKOC16SvFFsqOC2kupcgGNOd6nNmFBYB9rXvH3yLUzejYtB5Tn7QURy9E8grEFdV6gFavocE0gjJGbv37okXMXduZ+5SI7rUNpur4Fr/y90TQ15AERjVnPVE0xjG0bDc4KHr9hqZLzCE0PdHvbUeeHg2ymMT8BhO4ZlYoL1ZqjD3iN8KTqrXv1wUiiG++PT/BT5X4NFaIQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; From: Alexander Ivanov To: qemu-devel@nongnu.org Cc: den@virtuozzo.com, andrey.drobyshev@virtuozzo.com, cfontana@suse.de, kraxel@redhat.com, laurent@vivier.eu, mjt@tls.msk.ru Subject: [PATCH v2 1/1] module: Move local_err initialization to the loop in module_load_qom_all() Date: Mon, 12 Aug 2024 10:57:25 +0200 Message-ID: <20240812085725.1093540-2-alexander.ivanov@virtuozzo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240812085725.1093540-1-alexander.ivanov@virtuozzo.com> References: <20240812085725.1093540-1-alexander.ivanov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: WA1P291CA0003.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:19::6) To VI0PR08MB10743.eurprd08.prod.outlook.com (2603:10a6:800:205::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI0PR08MB10743:EE_|DB5PR08MB10253:EE_ X-MS-Office365-Filtering-Correlation-Id: 192c5540-1506-4a09-364d-08dcbaacce43 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?b9jXLr6nec3+IndeeE7QCB0ueg+IWxcyph8gVT+WC9LEBoelfx/Nf+1PPJK9?= =?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tkjslx0CX409/dBMGqT8RldM/Vm+Zn6jP8KK?= =?us-ascii?Q?wwPCqyCoParPURDbx0pQLzKhA/5PfgjYkUktQP26jhtKwIdolD8AvIJ40MlM?= =?us-ascii?Q?i3t8y9se9xSxidwTQyqJI2T2RG/CR5J6Hq4psQ93rcsO2NCt3vrDV01TX0Yy?= =?us-ascii?Q?8K88O1xgzKTDfY9XGMvtYYXl75z2CO7lHPdvCqV4bjnbZLW9Q5DNuyftkpgh?= =?us-ascii?Q?juiIxrOySYe14OSorBc18CTAETjy2FW8lnOwlqVteLwjU1CuzJiPXOrGTrn9?= =?us-ascii?Q?M+Dcu6zujAcMzX2QXECO44gSFF3s2J1sfQn/iagp2qCWgXdGKBglPC+0a2Kz?= =?us-ascii?Q?bhdj2OjZYrA+ztwWqaNv30Qste59mw/JfMvCx5sFlFMU8aAGV+AFuVMQleV3?= =?us-ascii?Q?dQb577+8hAK4YN5j3A5Rf0Ws9VLE/8EH/uIoPIJbKBT1yuhLDp5KkZzZh4Cs?= =?us-ascii?Q?+ZO2y4KrRMeE6uTc2NGfrknflwEUSlKsRSOkvcfB/cPpK6JYow=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI0PR08MB10743.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?EHamftO5zrCeviYzDB4lts5j3Z+Cpyk025VSWu1mPQF1A3SDR41a5zv9lG3a?= =?us-ascii?Q?/F0os+mlODptEYLzE1XeXwZGFt8Fl+thZ7zJjFOeCWzzwDAO7J/xrQSSY1i1?= =?us-ascii?Q?qirlof5pOOLflX2uLHOYtL/YpXczepU4AfAjrOli4Qo7hpQHknX0h1ORuaXA?= =?us-ascii?Q?Dy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WJ?= =?us-ascii?Q?r9MKrfR6QLP+o1z7k145KoA8EVWiWsgagyqWXnELd5BqKX1492CWaitJmVCD?= =?us-ascii?Q?WZI3ETkKk5QlHZSb1O+J5+HHCzKZ346KIouSS2rX4ADhj0HoOGsfUTqxzAOf?= =?us-ascii?Q?g4SH70gSkLpZ1QCUbEzh6SxYw3I+GIK91h32viRBJrwc/VuVokpCjcQWJ5de?= =?us-ascii?Q?hyQtsfrF9GJmxbLWJjZlzPISz8ZQtq6NDXi36QoHKXedgox4rcNPvVOeammz?= =?us-ascii?Q?oKDVazua6QpTCrkdgpE/yqp1SaFgfEJrL3Goi1slJdFSfAHq7chgur746Nd2?= =?us-ascii?Q?/beK62lCMxL22KpXf0h4qkrcYN5SGA4M9F47CVEvdOVtExMVzwhTqBIsrgCY?= =?us-ascii?Q?aQ/bSOJzJWjpdbyFLEekqGvN2W1FkdQ6l1QEWnFRWEtya759J6bRyPKO93CL?= =?us-ascii?Q?kFjwC1bip84bMTS+l82aec3qQLw1/pYqof9CghzZvwAXMemjffk97hToP6bK?= =?us-ascii?Q?dokbCr1xJltz4H6CglkObX6UD0/N1JHM9zX+J4LYaCFCoOBptIEJArPAJVOe?= =?us-ascii?Q?FbQjSyA6+LmJi6hlObt1Usg=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 192c5540-1506-4a09-364d-08dcbaacce43 X-MS-Exchange-CrossTenant-AuthSource: VI0PR08MB10743.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2024 08:57:33.9203 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: P3R185z1fgiv05b0CCQaolnEuoI6xLRG6x//Cr4ts/gIZKbufxZtCVp6CGAy+t4xpSM0tz3KAWWmitKnwp+Zk0WZ6NxE6Damm1+8p4RMdB0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB10253 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a01:111:f403:260c::713; envelope-from=alexander.ivanov@virtuozzo.com; helo=EUR03-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @virtuozzo.com) X-ZM-MESSAGEID: 1723453084119116600 Content-Type: text/plain; charset="utf-8" Move local_err initialization inside the loop in the module_load_qom_all() function. This change ensures that the error variable is reset to NULL for each iteration of the loop. This prevents triggering assert(*errp =3D=3D NU= LL) failure in error_setv() when local_err is reused in the loop. Note: The local_err variable is freed in error_report_err() so there is no any leak. Signed-off-by: Alexander Ivanov Reviewed-by: Claudio Fontana Reviewed-by: Michael Tokarev Reviewed-by: Richard Henderson --- util/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/module.c b/util/module.c index 32e263163c..3eb0f06df1 100644 --- a/util/module.c +++ b/util/module.c @@ -354,13 +354,13 @@ int module_load_qom(const char *type, Error **errp) void module_load_qom_all(void) { const QemuModinfo *modinfo; - Error *local_err =3D NULL; =20 if (module_loaded_qom_all) { return; } =20 for (modinfo =3D module_info; modinfo->name !=3D NULL; modinfo++) { + Error *local_err =3D NULL; if (!modinfo->objs) { continue; } --=20 2.43.0