From: Ilia Mirkin Date: Sat, 13 Sep 2014 15:28:28 +0000 (-0400) Subject: nouveau: check for mesa context init failure X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d7b0d832c474582824d663a795213d2889a737b;p=mesa.git nouveau: check for mesa context init failure Reported by Coverity Signed-off-by: Ilia Mirkin --- 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);