Abu Dawud said: The narrators other than Sa'id reported from Ibn Wahb in this tradition: "(killed him) with arrows in confinement." When Abu Ayyub al-Ansari was informed about it, he said: I heard the Messenger of Allah (ﷺ) prohibiting to kill in confinement. By Him in Whose hands my soul is, if there were a hen, I would not kill it in confinement. 'Abd al-Rahman b. Khalid b. al-Walid was informed about it (the Prophet's prohibition). He set four slaves free.
In-book : Book 15, Hadith 211
English translation : Book 14, Hadith 2681