On Wed, Feb 17, 2016 at 12:28:20PM +0100, Markus Pargmann wrote: > + if (filetype_is_barebox_image(filetype)) { > + struct bbu_data data = { > + .devicefile = filename, > + .imagefile = FASTBOOT_TMPFILE, > + .flags = BBU_FLAG_YES, > + }; > + > + if (!barebox_update_handler_exists(&data)) > + goto copy; > + > + fastboot_tx_print(f_fb, "INFOThis is an ARM Barebox image..."); > + > + data.image = read_file(data.imagefile, &data.len); > + if (!data.image) { > + fastboot_tx_print(f_fb, "FAILreading barebox"); > + return; > + } > + > + ret = barebox_update(&data); data.image must be freed after use. Added this. Sascha -- Pengutronix e.K. | | 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 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox