[Mesa-dev] [PATCH 2/4] secure malloc in translate_cache_create
Brian Paul
brianp at vmware.com
Mon Jan 24 08:18:50 PST 2011
On 01/24/2011 08:59 AM, Tim Wiederhake wrote:
> ---
> 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 d8069a1..3f1ecb6 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;
> }
Committed. Thanks.
I'll leave the r600 patches to the r600 developers to review/commit.
-Brian
More information about the mesa-dev
mailing list