It was as though he did not accept the claim that he had suffered memory deterioration, and so, in his treatise Those Spoken About in a Manner That Does Not Necessitate Rejection, he indicated the weakness of that assertion, saying (169/306):
“Trustworthy and well-known; it is said that he suffered memory deterioration toward the end of his life.”
And Allah knows best.
In any case, Hammad ibn Zayd concurred with Hammad ibn Salamah in transmitting it, both in its chain of transmission and its wording, but differed from him in attributing it to the Prophet. If he was mistaken concerning it, then his mistake was only in attributing it to a Companion. In that case, the matter is easy, for it carries the ruling of a report attributed to the Prophet, since it is not something that can be said merely on the basis of personal opinion, as is apparent. Thus, he constitutes strong corroboration for Hammad ibn Salamah. And Allah is the Granter of success.
Ibn Abi al-Dunya also transmitted it in al-Tahajjud (36–37), through Khalid ibn Abd Allah, from Ata ibn al-Sa'ib, with the report attributed to a Companion.
The hadith also has a supporting narration from Abu Dharr, attributed to the Prophet, with similar wording. Its chain of transmission contains an unknown narrator, and it is referenced in al-Mishkat (1922, second verification).
3479 — “The likeness of one who acquires knowledge and then does not impart it is that of one who hoards treasure and does not spend from it.”
Al-Tabarani transmitted it in al-Mu'jam al-Awsat (1/213/689), saying: Ahmad narrated to us; Yunus ibn Abd al-A'la narrated to us; Abd Allah ibn Wahb narrated to us; Ibn Lahi'ah narrated to me, from Darraj Abu al-Samh, from Abu al-Haytham and Abd al-Rahman ibn Hujayrah, from Abu Hurayrah, that the Messenger of Allah ﷺ said: ... and he mentioned it.
I say: This is a good chain of transmission, transmitted by at least two chains, through Ibn Wahb’s narration from Ibn Lahi'ah, and it is authentic