[PATCH xserver] glx: Fix error generation for non-reply vendor private requests

Alex Deucher alexdeucher at gmail.com
Tue Aug 22 17:23:22 UTC 2017


On Tue, Aug 22, 2017 at 12:19 PM, Adam Jackson <ajax at redhat.com> wrote:
> Discarding the return value here is just wrong.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  glx/glxcmds.c     | 3 +--
>  glx/glxcmdsswap.c | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/glx/glxcmds.c b/glx/glxcmds.c
> index 6a763970da..241abc6a58 100644
> --- a/glx/glxcmds.c
> +++ b/glx/glxcmds.c
> @@ -2376,8 +2376,7 @@ __glXDisp_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
>          __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info,
>                                         vendorcode, 0);
>      if (proc != NULL) {
> -        (*proc) (cl, (GLbyte *) req);
> -        return Success;
> +        return (*proc) (cl, (GLbyte *) req);
>      }
>
>      cl->client->errorValue = req->vendorCode;
> diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
> index 44a09e61cb..10d84062ed 100644
> --- a/glx/glxcmdsswap.c
> +++ b/glx/glxcmdsswap.c
> @@ -873,8 +873,7 @@ __glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
>          __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info,
>                                         vendorcode, 1);
>      if (proc != NULL) {
> -        (*proc) (cl, (GLbyte *) req);
> -        return Success;
> +        return (*proc) (cl, (GLbyte *) req);
>      }
>
>      cl->client->errorValue = req->vendorCode;
> --
> 2.13.5
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list