isl_basic_set_opt: avoid invalid access on error path
[platform/upstream/isl.git] / isl_flow.c
index 1a22094..8dca5c4 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2010      INRIA Saclay
  * Copyright 2012      Universiteit Leiden
  *
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
  *
  * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science,
  * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands
@@ -269,7 +269,7 @@ __isl_give isl_access_info *isl_access_info_add_source(
        isl_ctx *ctx;
 
        if (!acc)
-               return NULL;
+               goto error;
        ctx = isl_map_get_ctx(acc->sink.map);
        isl_assert(ctx, acc->n_must + acc->n_may < acc->max_source, goto error);