From 0c04cca0e1f10b0f0511f1dc0257c4b5138475e1 Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Fri, 3 Jan 2014 05:57:00 -0700 Subject: glx: Add missing null check in __glXNewIndirectAPI() Add extra null check in auto generated indirect_init.c via src/mapi/glapi/gen/glX_proto_send.py Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Brian Paul --- src/mapi/glapi/gen/glX_proto_send.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py index f4d519f144a..8b804418bc5 100644 --- a/src/mapi/glapi/gen/glX_proto_send.py +++ b/src/mapi/glapi/gen/glX_proto_send.py @@ -971,6 +971,8 @@ struct _glapi_table * __glXNewIndirectAPI( void ) entries = _glapi_get_dispatch_table_size(); table = malloc(entries * sizeof(_glapi_proc)); + if (table == NULL) + return NULL; /* first, set all entries to point to no-op functions */ for (i = 0; i < entries; i++) { -- cgit v1.2.3