Had a similar issue with some suddenly ownerless pigs recently, so don't just walk up and try to leash them. The first hog I tried was friendly and allowed itself to be named. No big deal. The second I tried to leash right after immediately became hostile, and gave me a few bruises before I got it back in the pen and out of my personal space. Tried the third the next day with the same result, so I let em all starve for a couple weeks and came back for them later when they had forgotten all about their old masters. Dogs will surely need the same treatment to keep them from going hostile.