projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3d6146
)
mesa/main: Check allocations success in _mesa_one_time_init_extension_overrides()
author
Juha-Pekka Heikkila
<juhapekka.heikkila@gmail.com>
Wed, 2 Jul 2014 17:50:42 +0000
(20:50 +0300)
committer
Tapani Pälli
<tapani.palli@intel.com>
Tue, 23 Sep 2014 07:25:02 +0000
(10:25 +0300)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/extensions.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/extensions.c
b/src/mesa/main/extensions.c
index 553c01e343beacff0c0cc96731847f824f8febda..43f0e8dd0cc99c8a86f676bdca3e82bb8db567cb 100644
(file)
--- 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;