Message ID | 20220530060304.1296389-4-dominique.martinet@atmark-techno.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCWIVBV7SUGRBJ542GKAMGQEMKKGCLA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=ouuqNP8i; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::113d; helo=mail-yw1-x113d.google.com; envelope-from=swupdate+bncbcwivbv7sugrbj542gkamgqemkkgcla@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-yw1-x113d.google.com (mail-yw1-x113d.google.com [IPv6:2607:f8b0:4864:20::113d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LBPwV1vNGz9s0r for <incoming@patchwork.ozlabs.org>; Mon, 30 May 2022 16:03:21 +1000 (AEST) Received: by mail-yw1-x113d.google.com with SMTP id 00721157ae682-2eb7d137101sf86568007b3.12 for <incoming@patchwork.ozlabs.org>; Sun, 29 May 2022 23:03:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653890599; cv=pass; d=google.com; s=arc-20160816; b=z1p5fh+OrVVkvTPBc5BVNkQyQhUCVCj2SZ1CwRy06zd3PdHSpDoGo/FlhUbv1nNeqv SzeRKu3w1RYbn2wsocoJ+UdCCc4KJVQwk6FarQzX/qfan1ZQ1S2rUwk9xQBCC1gSrZNz zoYACFABuuBpmofYTEkb+Lg4tpe37tsmp/rG3BnzIZlVERbViGqigHqjMYlUL0hBAfm9 1ozuObKZnu3sBNR9OoGVFIVFkMMZQRjKrxrnt4EyGMBDhcZMl3QT/nY42bdtPAGH2pge OzuYGLFK59TwNr++ZAyAiTQEcfGsuL5kLaLO9Bkt1yveCQ91QIAxY4u2XZa9eD8bwLB+ jn+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=eCpl0UWNJXYAddPEK4hq7MrSHLzmjlD/ldnnfG1KWAY=; b=Np5g3t4ik5KU1lGoVoydXoPOpITQ0bqpEFZC18YGGCY6qf41A6b4yzFXaty0KWQkTY zxX5De/OXw/b63ozqoO5bnA9Hmlo7rKotk7wU1DvpxEwle76Hx1RRQMZTc7KnnBlFfDt jMgCW5mH5IYxhIW/oy7YGbEO8UMj6OBHoZ2veHjXqfLaTTTzUATzd6mzKUGx1NCpUbJs J82+TXesf8VY6IEgtbJszgUEukp3cW0yK2NKF2D3SleDYwf+awtdlQAhN80J/BR7YpWw HmSjmKHVL0JfKUCER8boKTkq8Tp0MOgvo35J20Ip+BgQHXS/JvLpopUfM//Vr6XCNnCW DuMg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=eCpl0UWNJXYAddPEK4hq7MrSHLzmjlD/ldnnfG1KWAY=; b=ouuqNP8iZ+RDQQLjNRH+DZhxBBdrNzKd2kLH1RFGlxqhGL29ZtIA2Fga9YelAm9Xj+ 3JdI1kAt9jPHgimWY2BlAZtJzS8SqHqUZ29/PcKaZiTFSJzyaqw0duwJx6Vt6Nae/6WA UwZsr024yfxUpQvjXjVRNWP0nZ7J4bdSY4CZ/xVsaQ2J4X2zv5Mu/rxwaRqMwXlSCN4S 6HAT63fcgMyWy2IPI8qUOroEOEL74txq5UfxJ77gSoF/iduqnhsFNYFh7uDJys+QW2aP q4hYlBHPqVCd+GWQhk/kDYxz+t6CsjvcqbLzocjcmY5/44giVN6RYQubeDuW7V2g8t26 Ynfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=eCpl0UWNJXYAddPEK4hq7MrSHLzmjlD/ldnnfG1KWAY=; b=Dc7VEe1tR9l2HQXbxorKQJqa7NC850daDLH01qnmYPhRui9Al+1NRhGYLo2cmmfQ8l fnPpV8U8xwCbMNYLRuuhxiiRskquxjhXtmd0uXcqeaag4EPpaJd7jJExLxQ15d0UWSGw O3rRo6qGoZwCdaOvWsFXfOrwsUqGmb1r7+WY8RVe9Bkcm4ATFd+Hs+pSFr5WvSn9XsD1 gScqSdKjJXad8q+u7B2PpF8+xjbFeVHOx0nTkeblhThQOIWbI6ZEY1j5qnJITcw0A+Y3 R/0bZXsPFRZiv0tp5rM5DPxBYontDi8YuI4AWBUj3dzE9j216acPLQCO/v1r6bz+NZkH MJfQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533cOqedx3jnLp80e/5HgjJRTSXQv8GOE6LjDcGo63rs0f3gthTw HuaKIV9UMkmxXEyX5i+uRFA= X-Google-Smtp-Source: ABdhPJwRmi87v6Oos1gYWzEDXmVdO6ezTYkrl59vqszZ1WY6cQKlyjOhAQaQWry+oiwTw1CW5m9EBg== X-Received: by 2002:a0d:cc8e:0:b0:30c:1230:90c with SMTP id o136-20020a0dcc8e000000b0030c1230090cmr11975258ywd.469.1653890599382; Sun, 29 May 2022 23:03:19 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a81:108f:0:b0:2ff:9c64:9c25 with SMTP id 137-20020a81108f000000b002ff9c649c25ls12263436ywq.8.gmail; Sun, 29 May 2022 23:03:18 -0700 (PDT) X-Received: by 2002:a81:993:0:b0:30c:2287:7e6 with SMTP id 141-20020a810993000000b0030c228707e6mr8691565ywj.262.1653890598816; Sun, 29 May 2022 23:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653890598; cv=none; d=google.com; s=arc-20160816; b=srp923TzowlgDJgrTxZYa075QF0pauBQRaNgdseejqq7Do/QBwUEY/ZxZrFeSE1JKL Xw6kZuwEYeE5Eme9oArwukJ+F/y6JRHYLPCbNa/3ihm6DvezftPT3YQEXg1t96tCDvVj TWB+FD1KfZd/K32G2Sye5j3EwJFcx8PeAoHbusOssvacuZV55acqNW8yk0Yp1cFfUhmi 5bwAuvSsmWtZq0H7i6/VCbkREyP8f2Gsh+FSwuOVdDwLFm94lDGocBlfAbO4c0lR1/E2 V+g5oBzwXm3bETnjsaod6soq5QvHKIVJt7YkNJd6/8a6p3rQNRc0hj9PkaEHoB1/sbMv PAJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=cgI86EKyR5SKfI17e24pjW5wRI+KTgaa6UyWBAwsxFU=; b=vrQQ4/qvkLlaqf1rjyDhn7S7e1On5q/0VFCkB4jtEB5U4FbQHJryir0FnMV6Iy1/Eb WPBQ46NejY/IYGD8A9q18f02wCtxYk9Sn/Wxs7z8fHyILIAK78cOrMbQRMeoRc/K4Kkp 4OjA3KZ2SyrPUi8ZoBip0+FNivLWjf6MeBQredEzFsx9oQkwOUZWkPPEzFwBxKk9Uu1Y jpizeX27+DomnU1PBt+DCzaDeyocwap7zELctp7xnuBnbsXMV3BwqjpnfxYt2i03p0Xq IcXrLWvcC1wL+Yeo36QuYxZPJdt4Un38lWJWuWqaXDNqGYziTnMbz2MFBIcvTQ9m1gPS K4Kw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id x6-20020a25e006000000b0065c92486654si346613ybg.4.2022.05.29.23.03.18 for <swupdate@googlegroups.com>; Sun, 29 May 2022 23:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id C3BCF20D70 for <swupdate@googlegroups.com>; Mon, 30 May 2022 15:03:16 +0900 (JST) Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by gw2.atmark-techno.com (Postfix) with ESMTPS id AF5E920D70 for <swupdate@googlegroups.com>; Mon, 30 May 2022 15:03:16 +0900 (JST) Received: by mail-pg1-f198.google.com with SMTP id 35-20020a631563000000b003fc09751ce5so611214pgv.10 for <swupdate@googlegroups.com>; Sun, 29 May 2022 23:03:16 -0700 (PDT) X-Received: by 2002:a17:90b:4f81:b0:1e0:7643:36ae with SMTP id qe1-20020a17090b4f8100b001e0764336aemr21223746pjb.124.1653890595752; Sun, 29 May 2022 23:03:15 -0700 (PDT) X-Received: by 2002:a17:90b:4f81:b0:1e0:7643:36ae with SMTP id qe1-20020a17090b4f8100b001e0764336aemr21223734pjb.124.1653890595521; Sun, 29 May 2022 23:03:15 -0700 (PDT) Received: from pc-0115 (126.88.200.35.bc.googleusercontent.com. [35.200.88.126]) by smtp.gmail.com with ESMTPSA id n19-20020a17090a929300b001cb6527ca39sm5946739pjo.0.2022.05.29.23.03.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 May 2022 23:03:11 -0700 (PDT) Received: from martinet by pc-0115 with local (Exim 4.95) (envelope-from <martinet@pc-0115>) id 1nvYUf-005RIK-4s; Mon, 30 May 2022 15:03:09 +0900 From: Dominique Martinet <dominique.martinet@atmark-techno.com> To: swupdate@googlegroups.com, sbabic@denx.de Cc: Dominique Martinet <dominique.martinet@atmark-techno.com> Subject: [swupdate] [PATCH 3/6] grub: fix double-close on error Date: Mon, 30 May 2022 15:03:01 +0900 Message-Id: <20220530060304.1296389-4-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220530060304.1296389-1-dominique.martinet@atmark-techno.com> References: <20220530060304.1296389-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Fix gcc warnings or -fanalyzer warnings
|
expand
|
diff --git a/bootloader/grub.c b/bootloader/grub.c index 2d901b33293d..21bb6ac41a4d 100644 --- a/bootloader/grub.c +++ b/bootloader/grub.c @@ -52,7 +52,6 @@ static int grubenv_open(struct grubenv_t *grubenv) buf = calloc(1, size + 1); if (!buf) { ERROR("Not enough memory for environment"); - fclose(fp); ret = -ENOMEM; goto cleanup; }
fp is closed in 'cleanup' label: do not close before goto Reported-by: gcc -fanalyzer Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> --- bootloader/grub.c | 1 - 1 file changed, 1 deletion(-)