isl_basic_map_union: plug memory leak on error path
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 11 Apr 2012 12:15:29 +0000 (14:15 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 11 Apr 2012 20:03:19 +0000 (22:03 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index 240457a..b0f5100 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -6947,7 +6947,7 @@ struct isl_map *isl_basic_map_union(
 {
        struct isl_map *map;
        if (!bmap1 || !bmap2)
-               return NULL;
+               goto error;
 
        isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim), goto error);