Date: Tue, 6 Jul 2010 14:11:19 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: Yamagi Burmeister <lists@yamagi.org> Cc: Christoph Mallon <christoph.mallon@gmx.de>, freebsd-current@freebsd.org Subject: Re: PATCH: Potential ressource leak in sys/dev/fb/vesa.c Message-ID: <201007061411.20799.jkim@FreeBSD.org> In-Reply-To: <alpine.BSF.2.00.1007012046570.2120@maka.home.yamagi.org> References: <alpine.BSF.2.00.1007012046570.2120@maka.home.yamagi.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 01 July 2010 02:52 pm, Yamagi Burmeister wrote: > Hello, > while tracking down a bug in vesa.c which caused a crash a friend > of mine noticed a potential ressource leak in vesa.c. In line 841 > the execution is aborted via return (1); without freeing the > already allocated resources. the attached patch changes the line to > "goto fail;" which seems more correct. > > --- a/sys/dev/fb/vesa.c > +++ b/sys/dev/fb/vesa.c > @@ -836,7 +836,7 @@ vesa_bios_init(void) > "version 1.2 or later is required.\n", > ((vers & 0xf000) >> 12) * 10 + ((vers & 0x0f00) >> 8), > ((vers & 0x00f0) >> 4) * 10 + (vers & 0x000f)); > - return (1); > + goto fail; > } > > VESA_STRCPY(vesa_oemstr, buf->v_oemstr); Fixed on HEAD. Will be MFC'ed soon. Thanks! Jung-uk Kim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007061411.20799.jkim>