mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] ratp: Free buffers
@ 2020-05-20  8:44 Sascha Hauer
  2020-05-20  8:44 ` [PATCH 2/2] ratp: Test if console exists before using it Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2020-05-20  8:44 UTC (permalink / raw)
  To: Barebox List

recvbuf and sendbuf are never freed, free them to avoid memory holes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 lib/ratp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ratp.c b/lib/ratp.c
index 8167c5bd4c..1901cc8ea8 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1714,6 +1714,8 @@ void ratp_close(struct ratp *ratp)
 	list_for_each_entry_safe(msg, tmp, &ri->sendmsg, list)
 		ratp_msg_done(ri, msg, -ECONNRESET);
 
+	free(ri->recvbuf);
+	free(ri->sendbuf);
 	free(ri);
 	ratp->internal = NULL;
 
-- 
2.26.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-20  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20  8:44 [PATCH 1/2] ratp: Free buffers Sascha Hauer
2020-05-20  8:44 ` [PATCH 2/2] ratp: Test if console exists before using it Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox