public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ralph Siemsen <ralph.siemsen@linaro.org>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: u-boot@lists.denx.de, "Simon Glass" <sjg@chromium.org>,
	"Heiko Thiery" <heiko.thiery@gmail.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Marc Kleine-Budde" <mkl@pengutronix.de>,
	"Massimo Pegorer" <massimo.pegorer@vimar.com>,
	"Mattijs Korpershoek" <mkorpershoek@baylibre.com>,
	"Max Krummenacher" <max.krummenacher@toradex.com>,
	"Pali Rohár" <pali@kernel.org>,
	"Roman Kopytin" <Roman.Kopytin@kaspersky.com>,
	"Safae Ouajih" <souajih@baylibre.com>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Steven Lawrance" <steven.lawrance@softathome.com>,
	"Sughosh Ganu" <sughosh.ganu@linaro.org>,
	"Weijie Gao" <weijie.gao@mediatek.com>
Subject: Re: [PATCH v5 09/10] tools: spkgimage: add Renesas SPKG format
Date: Tue, 9 May 2023 09:07:16 -0400	[thread overview]
Message-ID: <20230509130716.GA3431193@maple.netwinder.org> (raw)
In-Reply-To: <80767553-7b0a-8ec4-f6c4-3b72cda767c5@mailbox.org>

On Tue, May 09, 2023 at 04:25:06AM +0200, Marek Vasut wrote:
>
>The usual fail path handling like:
>
>"
>if (there is an error)
>  goto exit;
>...
>
>exit:
> free(data);
> return ret;
>"
>
>does not work here ?

Yes, this would handle de-allocation in the failing case.

However in the normal case (no error), there is no corresponding call to 
free(). And there is no good place to put such a call, given the API of 
the callbacks. It would be possible call free() from print_header, 
however this is brittle since it relies on mkimage core calling 
print_header as the last step (and only once).

Ralph

  reply	other threads:[~2023-05-09 13:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24  1:15 [PATCH v5 00/10] Renesas RZ/N1 SoC initial support Ralph Siemsen
2023-04-24  1:15 ` [PATCH v5 01/10] ARM: armv7: add non-SPL enable for Cortex SMPEN Ralph Siemsen
2023-04-24  1:15 ` [PATCH v5 02/10] clk: renesas: prepare for non R-Car clock drivers Ralph Siemsen
2023-05-07 15:51   ` Marek Vasut
2023-04-24  1:15 ` [PATCH v5 03/10] clk: renesas: add R906G032 driver Ralph Siemsen
2023-05-07 15:53   ` Marek Vasut
2023-04-24  1:15 ` [PATCH v5 04/10] pinctrl: " Ralph Siemsen
2023-04-24  1:15 ` [PATCH v5 05/10] ram: cadence: add driver for Cadence EDAC Ralph Siemsen
2023-05-07 16:12   ` Marek Vasut
2023-04-24  1:15 ` [PATCH v5 06/10] ARM: dts: add devicetree for Renesas RZ/N1 SoC Ralph Siemsen
2023-05-07 15:54   ` Marek Vasut
2023-04-24  1:15 ` [PATCH v5 07/10] ARM: rmobile: Add support " Ralph Siemsen
2023-05-07 15:57   ` Marek Vasut
2023-04-24  1:15 ` [PATCH v5 08/10] board: schneider: add RZN1 board support Ralph Siemsen
2023-05-07 16:06   ` Marek Vasut
2023-05-08 18:23     ` Ralph Siemsen
2023-05-09  2:26       ` Marek Vasut
2023-05-09 13:21         ` Ralph Siemsen
2023-05-12 20:12           ` Ralph Siemsen
2023-04-24  1:15 ` [PATCH v5 09/10] tools: spkgimage: add Renesas SPKG format Ralph Siemsen
2023-05-07 16:08   ` Marek Vasut
2023-05-08 17:50     ` Ralph Siemsen
2023-05-09  2:25       ` Marek Vasut
2023-05-09 13:07         ` Ralph Siemsen [this message]
2023-05-09 14:52           ` Marek Vasut
2023-05-09 15:42             ` Ralph Siemsen
2023-05-12 20:14               ` Ralph Siemsen
2023-04-24  1:15 ` [PATCH v5 10/10] doc: renesas: add Renesas board docs Ralph Siemsen
2023-05-07 16:10   ` Marek Vasut
  -- strict thread matches above, loose matches on Subject: below --
2023-05-12 20:15 [PATCH v5 00/10] Renesas RZ/N1 SoC initial support Ralph Siemsen
2023-05-12 20:15 ` [PATCH v5 09/10] tools: spkgimage: add Renesas SPKG format Ralph Siemsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230509130716.GA3431193@maple.netwinder.org \
    --to=ralph.siemsen@linaro.org \
    --cc=Roman.Kopytin@kaspersky.com \
    --cc=heiko.thiery@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=marek.vasut@mailbox.org \
    --cc=massimo.pegorer@vimar.com \
    --cc=max.krummenacher@toradex.com \
    --cc=mkl@pengutronix.de \
    --cc=mkorpershoek@baylibre.com \
    --cc=pali@kernel.org \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=souajih@baylibre.com \
    --cc=steven.lawrance@softathome.com \
    --cc=sughosh.ganu@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=weijie.gao@mediatek.com \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox