mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: "Ulrich Ölmann" <>
To: Pengutronix Public Open-Source-Development <>
Cc: "Ulrich Ölmann" <>,
	"Kim Christensen" <>
Subject: [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free()
Date: Wed, 18 Sep 2019 16:48:23 +0200
Message-ID: <> (raw)

From: Kim Christensen <>

The function state_mtd_peb_read() is only a user of buf and not its owner, hence
it may not deallocate it.

Signed-off-by: Kim Christensen <>
Acked-by: Ulrich Ölmann <>
 src/barebox-state/backend_bucket_circular.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/barebox-state/backend_bucket_circular.c b/src/barebox-state/backend_bucket_circular.c
index aec17b312cab..f665c3b4539a 100644
--- a/src/barebox-state/backend_bucket_circular.c
+++ b/src/barebox-state/backend_bucket_circular.c
@@ -177,7 +177,6 @@ static int state_mtd_peb_read(struct state_backend_storage_bucket_circular *circ
 	if (ret < 0) {
 		dev_err(circ->dev, "Failed to read circular storage len %d, %d\n",
 			len, ret);
-		free(buf);
 		return ret;

OSS-Tools mailing list

             reply	other threads:[~2019-09-18 14:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 14:48 Ulrich Ölmann [this message]
2019-09-18 20:23 ` Uwe Kleine-König
2019-09-19  5:16   ` Ulrich Ölmann
2019-09-23  8:31     ` Roland Hieber

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:

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

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

mailarchive of the pengutronix oss-tools mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror oss-tools/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 oss-tools oss-tools/ \
	public-inbox-index oss-tools

Example config snippet for mirrors.

AGPL code for this site: git clone