summaryrefslogtreecommitdiffstats
path: root/src/mapi
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <[email protected]>2014-01-03 05:57:00 -0700
committerBrian Paul <[email protected]>2014-01-06 10:23:12 -0700
commit0c04cca0e1f10b0f0511f1dc0257c4b5138475e1 (patch)
treee8ad9f93fcbd7b747b9c71d1c27d82fa511d76e5 /src/mapi
parent0691b37732e3b032fbd354537b20090a3ee8e122 (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/glapi/gen/glX_proto_send.py2
1 files changed, 2 insertions, 0 deletions
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++) {