I'm sure everyone's done that at least once. You'll prolly have to tighten the bolt back up in order to get the socket off, then use an open-end or box wrench to get the bolt out.

Good luck.