Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates: A young man had recently married. The Prophet (peace and blessings be upon him) dispatched a military expedition, and the Prophet (peace and blessings be upon him) sent that man in this expedition too. When that man returned, he hurried to his home, and there was his wife standing at the door of the house. The man became very angry and pointed his spear at the woman to strike her. The woman said: Do not be hasty; look at what is in the house. He went into the house, and there was a snake lying on his bed. He struck the snake with the spear, and the snake died, and the man died too. News of this reached the Prophet (peace and blessings be upon him), and the Prophet (peace and blessings be upon him) said: Some jinn live in these houses. Then the Prophet (peace and blessings be upon him) forbade killing them.
Al-Tabarani recorded it in al-Mu'jam al-Saghir and al-Mu'jam al-Awsat; the narrators of al-Mu'jam al-Awsat are the narrators of the Sahih.