When David heard about it, he declared, “I vow by the LORD that I and my kingdom are forever innocent of this crime against Abner son of Ner.
Joab and his family are the guilty ones. May the family of Joab be cursed in every generation with a man who has open sores or leprosy or who walks on crutches or dies by the sword or begs for food!”
References for 2 Samuel 3:29
So Joab and his brother Abishai killed Abner because Abner had killed their brother Asahel at the battle of Gibeon.
Then David said to Joab and all those who were with him, “Tear your clothes and put on burlap. Mourn for Abner.” And King David himself walked behind the procession to the grave.
They buried Abner in Hebron, and the king and all the people wept at his graveside.
Then the king sang this funeral song for Abner: “Should Abner have died as fools die?
Your hands were not bound; your feet were not chained. No, you were murdered— the victim of a wicked plot.” All the people wept again for Abner.
David had refused to eat anything on the day of the funeral, and now everyone begged him to eat. But David had made a vow, saying, “May God strike me and even kill me if I eat anything before sundown.”
This pleased the people very much. In fact, everything the king did pleased them!
So everyone in Judah and all Israel understood that David was not responsible for Abner’s murder.
Then King David said to his officials, “Don’t you realize that a great commander has fallen today in Israel?
And even though I am the anointed king, these two sons of Zeruiah—Joab and Abishai—are too strong for me to control. So may the LORD repay these evil men for their evil deeds.”