power::eval(): fix several memory leaks