How good of buddies are you?
I goes case by case. If you shoot somebody thinking he's something else, then take off runnin', you're probably fu$$ed.
If its an accidental discharge, ricochet, or the like, and you stay to help, I'd imagine that no charges would be filed.