From e5a4a9694de61c82cfea86c0274404b95a2dd304 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 4 Jan 2013 14:28:42 +0100 Subject: [PATCH] pet_scop_from_pet_stmt: fix error handling Signed-off-by: Sven Verdoolaege --- scop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scop.c b/scop.c index c334d06..0dbf123 100644 --- a/scop.c +++ b/scop.c @@ -864,6 +864,8 @@ struct pet_scop *pet_scop_from_pet_stmt(isl_ctx *ctx, struct pet_stmt *stmt) return NULL; scop = scop_alloc(ctx, 1); + if (!scop) + goto error; scop->context = stmt_extract_context(stmt, scop->context); if (!scop->context) -- 2.11.4.GIT