* [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free()
@ 2019-09-18 14:48 Ulrich Ölmann
2019-09-18 20:23 ` Uwe Kleine-König
0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Ölmann @ 2019-09-18 14:48 UTC (permalink / raw)
To: Pengutronix Public Open-Source-Development
Cc: Ulrich Ölmann, Kim Christensen
From: Kim Christensen <kch@skov.dk>
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 <kch@skov.dk>
Acked-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
---
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;
}
--
2.23.0
_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free()
2019-09-18 14:48 [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free() Ulrich Ölmann
@ 2019-09-18 20:23 ` Uwe Kleine-König
2019-09-19 5:16 ` Ulrich Ölmann
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2019-09-18 20:23 UTC (permalink / raw)
To: Ulrich Ölmann
Cc: Pengutronix Public Open-Source-Development, Kim Christensen
On Wed, Sep 18, 2019 at 04:48:23PM +0200, Ulrich Ölmann wrote:
> From: Kim Christensen <kch@skov.dk>
>
> 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 <kch@skov.dk>
> Acked-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards and thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free()
2019-09-18 20:23 ` Uwe Kleine-König
@ 2019-09-19 5:16 ` Ulrich Ölmann
2019-09-23 8:31 ` Roland Hieber
0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Ölmann @ 2019-09-19 5:16 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Pengutronix Public Open-Source-Development, Kim Christensen
On Wed, Sep 18 2019 at 22:23 +0200, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> On Wed, Sep 18, 2019 at 04:48:23PM +0200, Ulrich Ölmann wrote:
>> From: Kim Christensen <kch@skov.dk>
>>
>> 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 <kch@skov.dk>
>> Acked-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Just saw that I erroneously only documented an ACK while I actually did
a review to approve the patch. So while applying please replace my
"Acked-by" by an "Reviewed-by".
Regards
Ulrich
--
Pengutronix e.K. | Ulrich Ölmann |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free()
2019-09-19 5:16 ` Ulrich Ölmann
@ 2019-09-23 8:31 ` Roland Hieber
0 siblings, 0 replies; 4+ messages in thread
From: Roland Hieber @ 2019-09-23 8:31 UTC (permalink / raw)
To: Ulrich Ölmann
Cc: Pengutronix Public Open-Source-Development, Kim Christensen,
Uwe Kleine-König
On Thu, Sep 19, 2019 at 07:16:03AM +0200, Ulrich Ölmann wrote:
> On Wed, Sep 18 2019 at 22:23 +0200, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > On Wed, Sep 18, 2019 at 04:48:23PM +0200, Ulrich Ölmann wrote:
> >> From: Kim Christensen <kch@skov.dk>
> >>
> >> 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 <kch@skov.dk>
> >> Acked-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
> >
> > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> Just saw that I erroneously only documented an ACK while I actually did
> a review to approve the patch. So while applying please replace my
> "Acked-by" by an "Reviewed-by".
Did so while applying, thanks!
- Roland
--
Roland Hieber | r.hieber@pengutronix.de |
Pengutronix e.K. | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-23 8:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 14:48 [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free() Ulrich Ölmann
2019-09-18 20:23 ` Uwe Kleine-König
2019-09-19 5:16 ` Ulrich Ölmann
2019-09-23 8:31 ` Roland Hieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox