There's an insignificant, small, trivial and not important at all part of every movie called "the script" . If it says you have to die, no matter what you say or what you want to do, you will have to. If we could choose what will happen, I would probably have saved the whole ship... (and there would be no movie at all ^^) so, yes... Leo had to die because the script said so !!! =p
^^