Releasing the mallard, unless you have trained it to survive on its own, is not a good thing. While it may seem desperate to get out, if it does not know how to feed itself, I am concerned it will go hungry.
I don't doubt you care very much, but this is a sticky situation.