diff options
Diffstat (limited to 'src/glsl/ralloc.c')
-rw-r--r-- | src/glsl/ralloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ralloc.c b/src/glsl/ralloc.c index 59e71c48b00..02816425221 100644 --- a/src/glsl/ralloc.c +++ b/src/glsl/ralloc.c @@ -108,6 +108,8 @@ ralloc_size(const void *ctx, size_t size) { void *block = calloc(1, size + sizeof(ralloc_header)); + if (unlikely(block == NULL)) + return NULL; ralloc_header *info = (ralloc_header *) block; ralloc_header *parent = ctx != NULL ? get_header(ctx) : NULL; |