From: Sven Verdoolaege Date: Tue, 4 Jun 2013 12:27:57 +0000 (+0200) Subject: isl_tab_pip.c: context_gbr_save: avoid invalid access on error path X-Git-Tag: isl-0.12~14^2~11 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fisl.git;a=commitdiff_plain;h=3fa832fd9d5096cf155fa91127058d69f176362d isl_tab_pip.c: context_gbr_save: avoid invalid access on error path Signed-off-by: Sven Verdoolaege --- 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;