Menachos, chapter 7, mishnah 4. Although the central topic of the chapter is the bread that accompanies the todah offering, since the chapter deals with items that are subordinate to offerings, the mishnah momentarily departs from that topic: in its first half it deals with the laws of the nesachim (libations).
What are the nesachim and how do they become sanctified:
The nesachim include the accompanying meal offering - fine flour, oil and frankincense - and the pouring of the wine. These accompany every olah and every shelamim, and some other offerings.
How do the nesachim take on their sanctity? Placing the components into a service vessel rests sanctity upon them, but full sanctification occurs only when two conditions come together: their being in a service vessel, and the slaughter of the animal that they come to accompany.
The language of the mishnah:
"Nesachim shekadshu bichli" - the components of the nesachim were placed in the proper vessel and in the proper place for them.
"Venimtza hazevach pasul" - afterwards it turned out that the animal they were designated to come with was disqualified, for whatever reason.
"Im yesh sham zevach acher - yikrevu imo" - if another offering is available at hand, the nesachim are brought with it in its place.
"Ve'im lav - yipaslu belinah" - nesachim that became partially sanctified and have no animal to be brought with are left overnight, and the next day they are burned in the place of burning, since they became disqualified by being left overnight.
At first glance this is puzzling: what is the logic here? How can nesachim that were designated for one offering be transferred to another offering? Under ordinary circumstances this indeed cannot be done, and the mishnah is dealing with a highly unusual case, one that meets two atypical criteria:
A communal offering: the case is specifically a communal offering, such as a musaf offering, in which - depending on the type of musaf - several olos are brought from communal funds. In the case of an individual, when his animal is found to be disqualified, the nesachim designated to accompany it are disqualified along with it. But with communal offerings there is a condition established in advance: should such a case arise, the one performing the slaughter has in mind to apply the nesachim to a different offering. And since the Sages are the ones who establish the procedures of the communal offerings, they have the power to determine that this is effective.
An offering that has already been slaughtered: he must have another animal that requires nesachim, and it must already have been slaughtered. So there are two slaughtered animals: the nesachim were designated for the first, and once it was found disqualified, they are brought for the second.
This ruling is essentially similar to a rabbinic law, and one should not conclude from it that nesachim may be exchanged after the fact. Therefore the Gemara qualifies it and says "in what case is this stated," presenting a very specific scenario: "shehayah zevach zavuach be'osah sha'ah" - that at the moment the first animal was found disqualified, another slaughtered animal was already waiting for nesachim. But if there was no slaughtered offering at that time, and the nesachim have nowhere to go, it is treated as though they were disqualified by being left overnight, and they are burned as disqualified nesachim.
It emerges that this is an extremely limited case: a communal offering that requires nesachim, presumably an olah, that was found to be disqualified, and at that same moment a second offering had already been slaughtered - and then the nesachim are brought with it. In any other case, no.
The second half of the mishnah: a todah that does not require bread:
A person who said "I take upon myself a todah" accepted upon himself only one obligation, and nevertheless he now has in hand two animals, both of which carry the sanctity of a todah. Must he bring loaves for both of them, or is it enough to bring the loaves of one of them, since he accepted only a single obligation?
But how can a person end up holding two animals with the sanctity of a todah, when he obligated himself in only one? The Mishnah lists three possibilities:
The offspring of the todah: The animal that was consecrated gave birth, and the offspring carries the same sanctity as its mother. A todah is valid from a male or a female, from an old animal or a young one, from a cow, a goat or a sheep. If he consecrated a cow as his todah, and before he offered it she gave birth to a calf - the calf too is sanctified with the sanctity of a todah, and even so a single set of loaves suffices for both.
The offspring is brought as a todah and is eaten for one day and one night, unlike shelamim, which are eaten for one day and two nights; apart from that, when there is no bread, todah and shelamim share the same laws.
It is worth noting that the Bartenura follows Rashi, that the case is one in which the animal was already pregnant at the time she was consecrated as a todah. It is not at all clear why this must be so and why she could not become pregnant after the consecration, and the later authorities as well, among them the Rashash, wonder why this condition is required at all.
Temurah (substitution): He has offering A in hand, and for some reason he decides to bring offering B in its place and to transfer the sanctity to it. But an animal that has been consecrated has sanctity resting upon it and it cannot be transferred, and the very attempt is forbidden by the Torah, as it says: "He shall not exchange it or substitute another for it, good for bad or bad for good, and if he does substitute animal for animal - then it and its substitute shall be holy." That is: it is forbidden to do so, but the act takes effect, and both animals stand in the same sanctity. So if he consecrated animal A as a todah and said that its sanctity should pass to animal B - both of them carry the sanctity of a todah, and he brings loaves with only one of them.
One who set aside his todah and it was lost: A person vowed "I take upon myself a todah," or he became obligated in a todah after being saved from a life threatening situation - he crossed the desert or the ocean, or he was released from prison. He set aside a particular goat and said: this will be my todah. When he came to take it, he found that it was lost, so he took another goat and said that it should come in its place, and while he was on his way to the Beis HaMikdash the first goat was found. Now he has two goats consecrated as a todah, while his obligation is only one.
In that scenario he did nothing improper; he erred in complete good faith and with the best of intentions, but the bottom line is that he consecrated two animals as a todah. Both are offered, but only the first one he brings comes with its forty loaves, while the second is offered as a todah with no loaves at all. The choice of which to offer first is in his hands: the one he consecrated first, or the one he prefers - it makes no difference.
The source of the law in the words of the Mishnah:
The basis for the rule that a second todah is offered without bread is derived from an exposition of the verse, in the words of the Mishnah: "V'lad todah u'temurasah, v'hamafrish todaso v'avdah v'hifrish acheres tachteha - einan te'unin lechem" - the offspring, and likewise the second animal that comes by force of the attempted substitution, and likewise one who set aside a todah, it was lost, and he set aside another in its place and then the first was found - the second animal does not require bread, only the first.
"Shene'emar: 'V'hikriv al zevach hatodah'" - the definite article appears superfluous, and it is expounded to teach that specifically this todah and not another: "HaTodah te'unah lechem, v'lo v'ladah v'lo chalifasah v'lo temurasah te'unin lechem" - the original todah is the one that requires loaves with it, whereas its offspring, its replacement and its substitute do not require that bread be brought with them.