From 3fa832fd9d5096cf155fa91127058d69f176362d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 4 Jun 2013 14:27:57 +0200 Subject: [PATCH] isl_tab_pip.c: context_gbr_save: avoid invalid access on error path Signed-off-by: Sven Verdoolaege --- isl_tab_pip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isl_tab_pip.c b/isl_tab_pip.c index 6d8496e..7fb34c7 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -3222,6 +3222,9 @@ static void *context_gbr_save(struct isl_context *context) struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; struct isl_gbr_tab_undo *snap; + if (!cgbr->tab) + return NULL; + snap = isl_alloc_type(cgbr->tab->mat->ctx, struct isl_gbr_tab_undo); if (!snap) return NULL; -- 2.7.4