xf86-video-nv: configure.ac src/nv_driver.c
Aaron Plattner
aplattner at nvidia.com
Sun Apr 1 01:22:59 PDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, Apr 01, 2007 at 04:30:09AM +0200, Luc Verhaegen wrote:
> On Sat, Mar 31, 2007 at 05:58:46PM -0700, Henry Zhao wrote:
> > configure.ac | 3 ++
> > src/nv_driver.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 73 insertions(+)
> >
> > New commits:
> > diff-tree d569934c3de326483347db00d34268b02101599c (from 4d929d383abe064b5334847eb466321a6bf30999)
> > Author: Henry Zhao <henryz at localhost.localdomain>
> > Date: Sat Mar 31 18:47:30 2007 -0800
> >
> > 10360: Need to inject a mode corresponding panel width/height for validation
> >
>
> ...
>
> > @@ -1556,6 +1594,38 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
> > max_height = 4096;
> > }
> >
> > +#ifdef USE_CVTMODE_FUNC
> > + /* If DFP, add a modeline corresponding to its panel size */
> > + if (pNv->FlatPanel && !pNv->Television && pNv->fpWidth && pNv->fpHeight) {
> > + DisplayModePtr Mode;
> > +
> > + Mode = xnfcalloc(1, sizeof(DisplayModeRec));
> > + Mode = xf86CVTMode(pNv->fpWidth, pNv->fpHeight, 60.00, TRUE, FALSE);
>
> MemLeak.
>
> At no point is the seperately allocated mode fed into xf86CVTMode. A
> mode (and Mode->name) is allocated for you _in_ xf86CVTMode, and then
> returned. The pointer of the seperately allocated ModeRec just gets
> overwritten.
Thanks, Luc. Fixed.
- -- Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGD2vj9WrMjwm6ljURAl6oAJ0bv55NDgiBrzQhSj8x2Gl0VDcjlQCgyexr
uxMf3Leo+qjmlsL+W8qYxA0=
=0wtB
-----END PGP SIGNATURE-----
More information about the xorg
mailing list