Branch: Tag:

2017-11-18

2017-11-18 10:13:13 by Arne Goedeke <el@laramies.com>

Interpreter: make sure to free save_locals_bitmask correctly

2109:    res->scope=0;    res->pc = NULL;    +  res->save_locals_bitmask = NULL;    return res;    }   
4092:    frame->num_locals = 0;    frame->num_args = 0;    frame->return_addr = NULL; -  if (UNLIKELY(frame->flags & PIKE_FRAME_SAVE_LOCALS)) +  if (UNLIKELY(frame->save_locals_bitmask)) {    free(frame->save_locals_bitmask); -  +  frame->save_locals_bitmask = NULL; +  }    frame->flags = 0;    return;    }
4300:    if (frame->flags & PIKE_FRAME_SAVE_LOCALS) {    frame->flags &= ~PIKE_FRAME_SAVE_LOCALS;    free(frame->save_locals_bitmask); +  frame->save_locals_bitmask = NULL;    }    frame->num_locals = num_new_locals;    frame->locals=s;