The Dwarf in the Flask, of Fullmetal Alchemist: Brotherhood, is seen trapped within a flask during his first appearance.
At one point in the series, The Dwarf states that his greatest wish is to leave the flask (from FMA Wikia):
Being a homunculus with no form, the Dwarf in the Flask was unable to perform any alchemy of his own. Furthermore, though the flask was the only thing that keeps him alive, [The Dwarf] desired to exist outside it.
However, due to the emboldened part above, it appears the flask is somehow keeping him alive (though he is only corked inside it). How does it do this, and how would he die if he left?