mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 04:40:06 +01:00
glapi: Correct size of allocated _glapi_table struct
The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct
as an array of _glapi_get_dispatch_table_size() pointers, so we have to
allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather than
sizeof(struct _glapi_struct) bytes.
Signed-off-by: Jonas Maebe <jonas.maebe@elis.ugent.be>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit adcb48a29d)
This commit is contained in:
parent
6b45dff024
commit
e4dbdee392
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp)
|
|||
struct _glapi_table *
|
||||
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix)
|
||||
{
|
||||
struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
|
||||
struct _glapi_table *disp = calloc(_glapi_get_dispatch_table_size(), sizeof(void*));
|
||||
char symboln[512];
|
||||
|
||||
if (!disp)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue