Exactly. They say the Buddha was a very pragmatic man and the whole purpose of his practice was to find a way out of Samsara, the cycle of existence and suffering.
I always wonder if he would have advocated for suicide if only he didn't believe in rebirth.