projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d6abd2
)
secure malloc in translate_cache_create
author
Tim Wiederhake
<twied@gmx.net>
Mon, 24 Jan 2011 15:59:15 +0000
(07:59 -0800)
committer
Brian Paul
<brianp@vmware.com>
Mon, 24 Jan 2011 16:17:54 +0000
(09:17 -0700)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/translate/translate_cache.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/translate/translate_cache.c
b/src/gallium/auxiliary/translate/translate_cache.c
index d8069a149cfe94569cd2728754dcc9d3c5d9e924..3f1ecb630f2ab5c989f17b6c3cb6129e86997ea7 100644
(file)
--- a/
src/gallium/auxiliary/translate/translate_cache.c
+++ b/
src/gallium/auxiliary/translate/translate_cache.c
@@
-40,6
+40,10
@@
struct translate_cache {
struct translate_cache * translate_cache_create( void )
{
struct translate_cache *cache = MALLOC_STRUCT(translate_cache);
+ if (cache == NULL) {
+ return NULL;
+ }
+
cache->hash = cso_hash_create();
return cache;
}