1 Kings 2:26 & 27

"To Abiathar the priest the king said, 'Go back to your fields in Anathoth. You deserve to die, but I will not put you to death now, because you carried the ark of the Sovereign Lord before my father David and shared all my father's hardships.' So Solomon removed Abiathar from the priesthood of the Lord, fulfilling the word the Lord had spoken at Shiloh about the house of Eli." NIV translation

Solomon spared Abiathar the priest but removed him from his office. He was remembered for the good things that he had done for King David. This was fulfilling the curse that was upon the house of Eli the unfaithful priest (see 1 Samuel 2:27).