From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25C28C00140 for ; Wed, 24 Aug 2022 11:15:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D38808423A; Wed, 24 Aug 2022 13:15:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="nxDXWkKs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5790684314; Wed, 24 Aug 2022 13:15:37 +0200 (CEST) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E0D0284194 for ; Wed, 24 Aug 2022 13:15:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ed1-x52e.google.com with SMTP id q2so19460102edb.6 for ; Wed, 24 Aug 2022 04:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=7z2/JYa0g4zUtjbJtaxzZDrkl7hE6JZhGvhJcGA2adw=; b=nxDXWkKs/hhymdtHsjtM3FucOzGmQYpu7pih1Fb51kXAO23Q3RJ7rquNM923ORABUb mW6zgQjudvsM8TX40nXAbf4TQotkMJgl3Y7GKVfxK0jl1mZxjwrTrIkze1IdQ6jFPWDa mY2eJEQZVIa3ZNELEZvGuW/j8AE5gCHMTU7ti2bSqLg33/fC/b57AScLwudTQhD9FZ8R 2RLTDHtYOnmYnLrG4ugnlef1UtcAksJfNhT/xi9HrZHtsIiCDusD8ZFWh2AMBSJngjUy 6jUZyuh5HVLEPv5x2cfheMGUc8XUw3HrB9zvGEi1R0w6YGb32WFAT+PDDgokeXVhV3O+ vNvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=7z2/JYa0g4zUtjbJtaxzZDrkl7hE6JZhGvhJcGA2adw=; b=lRKKnKnUBPepsjqrRSECHtImuVHlCR1SmIVdvtNECGDNEhYMXTomIG0pIGFL+8Mne4 ov3GEI5P4ASeYajvaDlVPChTRzOPiBO1PN/07ewAmienvRuSRy7ZEE1E31iu6FMN75sf nmhEC7h/xNkh76/lIHIA499/bGzDig+ZU1DRvsjP0ziYOI9ImHF0jNlG/3N9yklfyLbA CQM74UgxCWxn9W8x5J2tV9xf4zhJS2jr5XQlajDN5HZwJ+l/6VPdZHCUI1p93s6j/tTD 20DXMlHst3LjijTjeecAmeT7ZwNCZwfLzloow6soECsCjUiqfM4CwDNl8ftP0G13/5bO JlVg== X-Gm-Message-State: ACgBeo10jyyf9NFaP5xmojkH/mL8y3SSlYRynlGNEZ/bbL5YU0qgDseL hasVp/PlQftU0tyskOiAwponpA== X-Google-Smtp-Source: AA6agR41nyFJAxEewcG61igKJeZBGjmY1USEd85K+UqzkDg37yBFB4DjtwgnlDa2CHFYvu/UNo0ryQ== X-Received: by 2002:a05:6402:42c3:b0:43d:682f:c0ca with SMTP id i3-20020a05640242c300b0043d682fc0camr7233717edc.334.1661339734421; Wed, 24 Aug 2022 04:15:34 -0700 (PDT) Received: from hades ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id z13-20020aa7d40d000000b00445e506ddcasm2866234edq.57.2022.08.24.04.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 04:15:33 -0700 (PDT) Date: Wed, 24 Aug 2022 14:15:30 +0300 From: Ilias Apalodimas To: Masahisa Kojima Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , Takahiro Akashi , Mark Kettenis , Michal Simek , Ovidiu Panait , Ashok Reddy Soma , John Keeping , Chris Morgan , Artem Lapkin , Huang Jianan Subject: Re: [PATCH v13 1/9] eficonfig: menu-driven addition of UEFI boot option Message-ID: References: <20220824063740.5760-1-masahisa.kojima@linaro.org> <20220824063740.5760-2-masahisa.kojima@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220824063740.5760-2-masahisa.kojima@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Kojima-san, [...] > + * eficonfig_destroy() - destroy efimenu > + * > + * @efi_menu: pointer to the efimenu structure > + * @flag: flag to free the allocated data > + */ > +static void eficonfig_destroy(struct efimenu *efi_menu, bool flag) > +{ > + struct list_head *pos, *n; > + struct eficonfig_entry *entry; > + > + list_for_each_safe(pos, n, &efi_menu->list) { > + entry = list_entry(pos, struct eficonfig_entry, list); > + free(entry->title); > + if (flag) > + free(entry->data); I don't we need this flag. entry->data is either set to a valid pointer or NULL on append_entry(). > + list_del(&entry->list); > + free(entry); > + } > + free(efi_menu->menu_header); > + free(efi_menu); [...] Regards /Ilias