Branch: Tag:

2018-01-25

2018-01-25 11:11:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed type leak in get_argument_type().

Fixes PIKE-60 (#8060).

5648:    */   struct pike_type *get_argument_type(struct pike_type *fun, int arg_no)   { -  struct pike_type *tmp; +  struct pike_type *tmp, *tmp2;       loop:    switch(fun->type) {    case T_OR: -  return or_pike_types(get_argument_type(fun->car, arg_no), -  get_argument_type(fun->cdr, arg_no), +  fun = or_pike_types(tmp = get_argument_type(fun->car, arg_no), +  tmp2 = get_argument_type(fun->cdr, arg_no),    1); -  +  free_type(tmp); +  free_type(tmp2); +  return fun; +     case T_FUNCTION:    if (arg_no > 0) {    arg_no--;