isl_input.c: obj_read: avoid NULL pointer dereference
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 25 Jun 2010 18:17:41 +0000 (20:17 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Jun 2010 15:37:39 +0000 (17:37 +0200)
isl_input.c

index b70b091..8747e56 100644 (file)
@@ -1385,6 +1385,10 @@ static struct isl_obj obj_read(struct isl_stream *s, int nparam)
                return obj;
        }
        v = vars_new(s->ctx);
+       if (!v) {
+               isl_stream_push_token(s, tok);
+               goto error;
+       }
        bmap = isl_basic_map_alloc(s->ctx, 0, 0, 0, 0, 0, 0);
        if (tok->type == '[') {
                isl_stream_push_token(s, tok);