diff options
author | Tim Wiederhake <[email protected]> | 2011-01-24 07:59:15 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-01-24 09:17:54 -0700 |
commit | c48dd8049ccc46c075c9836c4bd3a66ed3edd83a (patch) | |
tree | a7b92ec2030327ad20463560beefbc63598eba3b /src/gallium/auxiliary/translate | |
parent | 7d6abd254a46e37a27401c3ae0ce0645d8b0decd (diff) |
secure malloc in translate_cache_create
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/translate')
-rw-r--r-- | src/gallium/auxiliary/translate/translate_cache.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/translate/translate_cache.c b/src/gallium/auxiliary/translate/translate_cache.c index d8069a149cf..3f1ecb630f2 100644 --- 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; } |