Branch: Tag:

2022-01-01

2022-01-01 09:54:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix mapping leak in type_binop().

4739:    tmp = low_type_binop(op, a->car, b, remap, aflags, bflags, remap_flags);    if ((remap_flags & PT_FLAG_REMAP_INEXACT) && tmp) {    if ((op == PT_BINOP_AND) || (op == PT_BINOP_MINUS)) { +  if (remap) { +  do_free_mapping(remap->markers); +  remap->markers = orig_markers; +  }    free_type(tmp);    add_ref(a);    return a;
4844:    tmp = low_type_binop(op, a, b->car, remap, aflags, bflags, remap_flags);    if ((remap_flags & PT_FLAG_REMAP_INEXACT) && tmp) {    if (op == PT_BINOP_AND) { +  if (remap) { +  do_free_mapping(remap->markers); +  remap->markers = orig_markers; +  }    free_type(tmp);    add_ref(a);    return a;