From: Sven Verdoolaege Date: Wed, 5 Jun 2013 07:54:18 +0000 (+0200) Subject: isl_union_map_alloc: avoid double free on error path X-Git-Tag: isl-0.12~14^2~5 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fisl.git;a=commitdiff_plain;h=db95aa6cb9dd926ef2c119072410b33d1b460c6e isl_union_map_alloc: avoid double free on error path Signed-off-by: Sven Verdoolaege --- diff --git a/isl_union_map.c b/isl_union_map.c index 1528ebd..0f7a9ce 100644 --- a/isl_union_map.c +++ b/isl_union_map.c @@ -51,13 +51,9 @@ static __isl_give isl_union_map *isl_union_map_alloc(__isl_take isl_space *dim, umap->ref = 1; umap->dim = dim; if (isl_hash_table_init(dim->ctx, &umap->table, size) < 0) - goto error; + return isl_union_map_free(umap); return umap; -error: - isl_space_free(dim); - isl_union_map_free(umap); - return NULL; } __isl_give isl_union_map *isl_union_map_empty(__isl_take isl_space *dim)