mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] gadget: f_fastboot: Fix memory leak
@ 2020-01-27  7:42 Christian Eggers
  2020-01-27 13:02 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Eggers @ 2020-01-27  7:42 UTC (permalink / raw)
  To: barebox; +Cc: Christian Eggers, ceggers

bootm_data::os_file is not required to be a copied string. It isn't
freed anywhere.

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 drivers/usb/gadget/f_fastboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 35c4b8cf4..0a3aff3cf 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -769,7 +769,7 @@ static void __maybe_unused cb_boot(struct f_fastboot *f_fb, const char *opt)
 	globalvar_set_match("linux.bootargs.dyn.", "");
 	globalvar_set_match("bootm.image", "");
 
-	data.os_file = xstrdup(FASTBOOT_TMPFILE);
+	data.os_file = FASTBOOT_TMPFILE;
 
 	ret = bootm_boot(&data);
 
-- 
Christian Eggers
Embedded software developer

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918
Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477
Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler


_______________________________________________
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-01-27 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27  7:42 [PATCH] gadget: f_fastboot: Fix memory leak Christian Eggers
2020-01-27 13:02 ` Sascha Hauer

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