added calls to _mesa_error_no_memory() if memory allocation returned null pointer.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/util/set.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/set.c b/src/util/set.c index c3252a0..b0baccc 100644 --- a/src/util/set.c +++ b/src/util/set.c @@ -38,6 +38,7 @@ #include "macros.h" #include "ralloc.h" #include "set.h" +#include "main/errors.h" /* * From Knuth -- a good choice for hash/rehash values is p, p-2 where @@ -111,8 +112,10 @@ _mesa_set_create(void *mem_ctx, struct set *ht; ht = ralloc(mem_ctx, struct set); - if (ht == NULL) + if (ht == NULL) { + _mesa_error_no_memory(__func__); return NULL; + } ht->size_index = 0; ht->size = hash_sizes[ht->size_index].size; @@ -125,6 +128,7 @@ _mesa_set_create(void *mem_ctx, ht->deleted_entries = 0; if (ht->table == NULL) { + _mesa_error_no_memory(__func__); ralloc_free(ht); return NULL; } -- 1.8.5.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev