Fix memory leak for no-return invocations.