[Mesa-dev] [PATCH 2/7] util: use rzalloc instead on ralloc in _mesa_hash_table_create()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Tue Jun 14 14:59:01 UTC 2016
rzalloc guarantee we get zeroed memory which is needed here.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/util/hash_table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/hash_table.c b/src/util/hash_table.c
index 4cfe3d9..9097e85 100644
--- a/src/util/hash_table.c
+++ b/src/util/hash_table.c
@@ -117,7 +117,7 @@ _mesa_hash_table_create(void *mem_ctx,
{
struct hash_table *ht;
- ht = ralloc(mem_ctx, struct hash_table);
+ ht = rzalloc(mem_ctx, struct hash_table);
if (ht == NULL)
return NULL;
--
1.9.1
More information about the mesa-dev
mailing list