Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nJbMc-0005Uu-7M for mharc-grub-devel@gnu.org; Mon, 14 Feb 2022 08:26:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJbMZ-0005TL-Jc for grub-devel@gnu.org; Mon, 14 Feb 2022 08:25:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJbMY-0004Lf-1N for grub-devel@gnu.org; Mon, 14 Feb 2022 08:25:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644845153; 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; bh=edIXCWguWZDWCYQMPG9gKmSwHBXDtnfL7iV0YpQxp6Q=; b=PvBSyi4AwfdJVwv/sEc06wh10B3Hmqadvvsyki5jk353nPllwIsonjxuR+EaxCZJAkhN37 Vyj3G0WQ/14+yYhuWW7AZPSfXBqhB4gTMTsyzFKjqR7QrDsQgAZyjcjjApLp/5LSN+B+4D byk46tSdIc4peRki2/JiGKc+K61KjQQ= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-542-stzUsGNdPYSbRP_I-jvYuA-1; Mon, 14 Feb 2022 08:25:52 -0500 X-MC-Unique: stzUsGNdPYSbRP_I-jvYuA-1 Received: by mail-wr1-f71.google.com with SMTP id g11-20020adfa48b000000b001e57dfb3c38so3160991wrb.2 for ; Mon, 14 Feb 2022 05:25:52 -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:mime-version :content-transfer-encoding; bh=edIXCWguWZDWCYQMPG9gKmSwHBXDtnfL7iV0YpQxp6Q=; b=y4jw94X8iFOr/nQL/MSmIOZvUarVK2FA51dcsjMGK2zdyMBNe3bqQBuoBHuGTS7blQ UDWZ6cQpGtBUdk33R2olv9M2xxzk4EtzxGCN+CR/WA3LGUBsDTvBWD88V43/9iIctmU3 DWAiSJEJZW8jrxoFyJfBdKXPpT9wnWcWSiLPMZyWeyO8xpxdSTERkQupFBCvEshO2AyC 5MOCN4cwWxsMvXjsj3lNXCcJSKUdSSg020e8TrJeYT4G57iLO/rRYuHHmlnnxA1ymczA 0KAF/UqqwH0ghgi4BtjpQpB2WbsTpAMGA8tp+oKft4XAJHbg5Oc29/J0O5J+l96kkHOi dkdw== X-Gm-Message-State: AOAM531zkF5aI/Wg8jH25FwRotgqAJ4pbgZiByN7td3e8Ysvrjd3+JU7 aLKVXraUxSuGK/Fz0XUhcnp2SABGG463hAhrS9bxgRdOVcYQGpu7o8CSZJLn2frEvd/m0bjqVYG S1MI8D8ucqgcMenXZ2vr5pwoKjbAXOWsD4qiU4FYW8GZBWULx23V4PzS6AYqaKVk= X-Received: by 2002:a05:6000:118a:: with SMTP id g10mr11577990wrx.315.1644845150951; Mon, 14 Feb 2022 05:25:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyX3MyA7rEv71H4aPpBXQalFyOQFnebt1nC3MOlg2d9FcQj35D17Zoku0Ej07MQOPLXwIqBCQ== X-Received: by 2002:a05:6000:118a:: with SMTP id g10mr11577976wrx.315.1644845150723; Mon, 14 Feb 2022 05:25:50 -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 k34sm11316183wms.35.2022.02.14.05.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 05:25:50 -0800 (PST) From: =?UTF-8?q?Renaud=20M=C3=A9trich?= To: grub-devel@gnu.org Cc: =?UTF-8?q?Renaud=20M=C3=A9trich?= Subject: [PATCH v2 2/2] lsefi: fixed memory leaks Date: Mon, 14 Feb 2022 14:25:39 +0100 Message-Id: <20220214132539.37754-1-rmetrich@redhat.com> X-Mailer: git-send-email 2.34.1 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:25:56 -0000 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