diff options
author | Juha-Pekka Heikkila <[email protected]> | 2014-07-02 20:50:42 +0300 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2014-09-23 10:25:02 +0300 |
commit | 51aa22148099f3c7e7e63b77523af629a535fa43 (patch) | |
tree | 432a170aa1fccce7900731e4eb865c1fe9a86bc9 /src | |
parent | a3d6146e3a772059bfb68d5d041df2b96c4cc444 (diff) |
mesa/main: Check allocations success in _mesa_one_time_init_extension_overrides()
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/extensions.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 553c01e343b..43f0e8dd0cc 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -609,6 +609,15 @@ _mesa_one_time_init_extension_overrides(void) /* Copy env_const because strtok() is destructive. */ env = strdup(env_const); + + if (env == NULL || extra_extensions == NULL || + cant_disable_extensions == NULL) { + free(env); + free(extra_extensions); + free(cant_disable_extensions); + return; + } + for (ext = strtok(env, " "); ext != NULL; ext = strtok(NULL, " ")) { int enable; bool recognized; |