[Mesa-dev] [PATCH 3/7] util: use rzalloc instead on ralloc in _mesa_set_create(()

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Jun 14 14:59:02 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/set.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/set.c b/src/util/set.c
index 99abefd..d64291d 100644
--- a/src/util/set.c
+++ b/src/util/set.c
@@ -110,7 +110,7 @@ _mesa_set_create(void *mem_ctx,
 {
    struct set *ht;
 
-   ht = ralloc(mem_ctx, struct set);
+   ht = rzalloc(mem_ctx, struct set);
    if (ht == NULL)
       return NULL;
 
-- 
1.9.1



More information about the mesa-dev mailing list