[PATCH 4/4] video/imx: always initialize offscreenbuf member
Sascha Hauer
s.hauer at pengutronix.de
Thu Jan 17 12:55:11 EST 2013
On Thu, Jan 17, 2013 at 02:04:22PM +0100, Daniel Mierswa wrote:
> On 01/17/2013 12:56 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 07:32 Thu 17 Jan , Daniel Mierswa wrote:
> >> + /*
> >> + * sc.offscreenbuf is dangling here, if no offscreen buffer was
> >> + * requested, so set it to NULL otherwise the free in fd_close
> >> + * will cause undefined behaviour
> >> + */
> >> + if (!offscreen)
> >> + sc.offscreenbuf = NULL;
> >> +
> > NAck
> >
> > this is already done by memset
> >
> > Best Regards,
> > J.
> >> if (sc.offscreenbuf) {
> >> if (do_bg)
> >> memset_pixel(&info, sc.offscreenbuf, bg_color,
>
> Huh? I don't get it.
sc is initialized to 0 in do_splash:
memset(&s, 0, sizeof(s));
memset(&sc, 0, sizeof(sc));
memset(&info, 0, sizeof(info));
so sc.offscreenbuf = NULL is a no-op.
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 |
More information about the barebox
mailing list