[Mesa-dev] [PATCH 09/11] glapi/glx: Sync some additional error checking from xserver

Ian Romanick idr at freedesktop.org
Mon Mar 28 17:54:24 UTC 2016


This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 03/24/2016 11:10 AM, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  src/mapi/glapi/gen/glX_proto_recv.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/mapi/glapi/gen/glX_proto_recv.py b/src/mapi/glapi/gen/glX_proto_recv.py
> index 21b187c..a138adb 100644
> --- a/src/mapi/glapi/gen/glX_proto_recv.py
> +++ b/src/mapi/glapi/gen/glX_proto_recv.py
> @@ -435,6 +435,10 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
>                  print '        %s %s = __glXGetAnswerBuffer(cl, %s%s, answerBuffer, sizeof(answerBuffer), %u);' % (param.type_string(), param.name, param.counter, size_scale, type_size)
>                  answer_string = param.name
>                  answer_count = param.counter
> +                print ''
> +                print '        if (%s == NULL) return BadAlloc;' % (param.name)
> +                print '        __glXClearErrorOccured();'
> +                print ''
>              elif c >= 1:
>                  print '        %s %s[%u];' % (answer_type, param.name, c)
>                  answer_string = param.name
> 



More information about the mesa-dev mailing list