Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nJbKR-0003Ij-L9 for mharc-grub-devel@gnu.org; Mon, 14 Feb 2022 08:23:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJbKP-0003Af-Np for grub-devel@gnu.org; Mon, 14 Feb 2022 08:23:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJbKM-0003wy-Sk for grub-devel@gnu.org; Mon, 14 Feb 2022 08:23:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644845017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cXnf+9wrOPnkWFdfljGh4lKcBFgWOTnwPdawDwFnvLE=; b=TNBHSX0pOv9GBEL9v0UdRR7GRuHMOrWzJXO/CNfS4QgJ2v6st0lk5t02AVMkLadciKfmpm jaengbQ9hmciWb/00kWaSNjGimeqwtw/21EO7Xd4FpsBloftgvgamyD18g5w9jdil4DoCM zVI95mbtAMsA6Wt/3/ZSiftJmsAFKY4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-132-8mX6TLSpN2OnhXig2XLzyQ-1; Mon, 14 Feb 2022 08:23:35 -0500 X-MC-Unique: 8mX6TLSpN2OnhXig2XLzyQ-1 Received: by mail-wm1-f70.google.com with SMTP id q63-20020a1c4342000000b0037c2f539dd0so760584wma.0 for ; Mon, 14 Feb 2022 05:23:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cXnf+9wrOPnkWFdfljGh4lKcBFgWOTnwPdawDwFnvLE=; b=nBaQeR3UD0Ji69bl4x6oFXYAC1gJvvJxmThbg13FeEXM+YX2f3AY6B5fvLySfvUGUg CYajaexKWc6SuYkn4t26GcHcHcHbWqNaKg7xWqd6aZp5Du1iVIqXd6Ht2gJf4fvRw45M TT3GOCt934ArPKsk06o8XUvCeh7lp/Zrhwwne8wiElji3Q4AI+ABH9Tz+FUjrXerOw8d UNr/pQlCNNl6CQ52qGkS/Op4oAeXIGYjy2IqK+S/aZ6nnuDu5/6BA7dtZjcl3YFDXUFB B2CK7zEnzIXH9MzrJIAFPC6NxJ19io7LoU4I1Y1kQLsV4+B3n0mwssbtffOUU5NSI535 XpRg== X-Gm-Message-State: AOAM532GJQsLj0HtP6cB5axT9dyuTAMtucbt+PI7ljoQd/anLZbfTZmZ He596u3v5lHUA6jNvPb0st27TRelGu/HyW2PJZgSX06TSwmIUWKRg/yslueKrTZbr1Mw+zVt47g OStNusyIqlbWe/aDOfHRsTdQued5cyi/ZV96GKZX9MS+RutAF4EcDMwkJpRQ+N4k= X-Received: by 2002:a05:6000:c1:: with SMTP id q1mr11042601wrx.479.1644845013634; Mon, 14 Feb 2022 05:23:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxFqxiq775RU+npP6mv9xQ4pg/P+1V+1iUHCcUoQbonlenQ/FLrV3Ni18pMFou9WoqigCCxg== X-Received: by 2002:a05:6000:c1:: with SMTP id q1mr11042585wrx.479.1644845013449; Mon, 14 Feb 2022 05:23:33 -0800 (PST) Received: from t590.redhat.com (lfbn-gre-1-180-51.w90-112.abo.wanadoo.fr. [90.112.144.51]) by smtp.gmail.com with ESMTPSA id i3sm30669556wrq.72.2022.02.14.05.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 05:23:32 -0800 (PST) From: =?UTF-8?q?Renaud=20M=C3=A9trich?= To: grub-devel@gnu.org Cc: Fedora Ninjas , =?UTF-8?q?Renaud=20M=C3=A9trich?= Subject: [PATCH v2 2/2] lsefi: fixed memory leaks Date: Mon, 14 Feb 2022 14:23:23 +0100 Message-Id: <20220214132323.37302-2-rmetrich@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220214132323.37302-1-rmetrich@redhat.com> References: <20220214132323.37302-1-rmetrich@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=rmetrich@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=rmetrich@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=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: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2022 13:23:42 -0000 From: Fedora Ninjas Signed-off-by: Renaud Métrich --- grub-core/commands/efi/lsefi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c index 7acba3b39..f0b9201f1 100644 --- a/grub-core/commands/efi/lsefi.c +++ b/grub-core/commands/efi/lsefi.c @@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)), (unsigned) protocols[j]->data4[7]); } + if (protocols) + grub_efi_free_pool (protocols); } + grub_free (handles); + return 0; } -- 2.34.1