From 1d7b0d832c474582824d663a795213d2889a737b Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 13 Sep 2014 11:28:28 -0400 Subject: [PATCH] nouveau: check for mesa context init failure Reported by Coverity Signed-off-by: Ilia Mirkin --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index f8c8dc38701..5be5ec5bc24 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -126,8 +126,8 @@ nouveau_context_init(struct gl_context *ctx, gl_api api, nouveau_fbo_functions_init(&functions); /* Initialize the mesa context. */ - _mesa_initialize_context(ctx, api, visual, - share_ctx, &functions); + if (!_mesa_initialize_context(ctx, api, visual, share_ctx, &functions)) + return GL_FALSE; nouveau_state_init(ctx); nouveau_scratch_init(ctx); -- 2.30.2