[PATCH] glx: fix uninitialized var in __glXDRIscreenProbe

Tomasz Lis listom at gmail.com
Fri Mar 15 02:39:21 PDT 2013


I agree with the change.
The handle_error jump does require framebuffer.base to be initialized.

Doing the initialization at top of __glXDRIscreenProbe body is also a good
idea - even if it could be initialized lower, doing it at top gives better
chance of not repeating the mistake on further modifications.

2013/2/23 Piotr Dziwinski <piotrdz at gmail.com>

> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59825
>
> Signed-off-by: Piotr Dziwinski <piotrdz at gmail.com>
> ---
>  glx/glxdri.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/glx/glxdri.c b/glx/glxdri.c
> index da46468..a997e2f 100644
> --- a/glx/glxdri.c
> +++ b/glx/glxdri.c
> @@ -971,6 +971,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
>      size_t buffer_size;
>      ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
>
> +    framebuffer.base = NULL;
> +
>      if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
>          !DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
> !isCapable) {
>          LogMessage(X_INFO,
> --
> 1.8.1.3
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130315/3b812613/attachment.html>


More information about the xorg-devel mailing list