[PATCH 1/2] xf86: actually set the compat output in the failure case

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 10 15:21:14 PST 2013

On Wed,  9 Jan 2013 13:14:54 +1000, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
> The previous fix for the previous fix, didn't fully work,
> If we don't set compat_output we end up doing derferences
> of arrays with -1, leading to valgrind warnings.
> Signed-off-by: Dave Airlie <airlied at redhat.com>

Ok, that makes sense. output can only be NULL at this point iff there
are no outputs and the existing compat_output is either unset or
invalid. Then the value of config->compat_output always matches the
xf86OutputPtr returned. And indeed explains the -1 that caused me pain
recently, thanks.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Chris Wilson, Intel Open Source Technology Centre

More information about the xorg-devel mailing list