xf86-video-nv: configure.ac src/nv_driver.c
Luc Verhaegen
libv at skynet.be
Sat Mar 31 19:30:09 PDT 2007
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.
Luc Verhaegen.
More information about the xorg
mailing list