Nedarim4: 8
הָיוּ מְהַלְּכִין בַּדֶּרֶךְ, וְאֵין לוֹ מַה יֹּאכַל — נוֹתֵן לְאַחֵר לְשׁוּם מַתָּנָה, וְהַלָּה מֻתָּר בָּהּ. אִם אֵין עִמָּהֶם אַחֵר — מַנִּיחַ עַל הַסֶּלַע אוֹ עַל הַגָּדֵר, וְאוֹמֵר: ,,הֲרֵי הֵן מֻפְקָרִים לְכָל מִי שֶׁיַּחְפּוֹץ”, וְהַלָּה נוֹטֵל וְאוֹכֵל; וְרַבִּי יוֹסֵי אוֹסֵר.
[If] they were traveling on the road, and he did not have what to eat, he gives [food] to someone else as a gift, and that one is permitted it. If there is no one else with them, he puts [it] on a rock or on a fence, and says: “These are free for whoever should want,” and that one takes and eats; R' Yose, however, forbids [this].