Its two different incidents bro which I highlighted, some sahabah did complain, and this angered the Prophet SAW and it was near the farewell pilgrimage and happened in yemen hence the merits of Sayyiduna ALI being a maula to the believers was said in ghadir. This incident you are refering to is the sunni perspective on the ghadir declaration. In brief sayyiduna ALI went to yemen, large booty was attained, Sayyiduna ali did not allow it to be distrubuted yet, he left for hajj, and in the meantime the deputy did succumb to the requests of the troops and gave them cloths to clothe themselves. Heres a brief explanation from the seera.
" When Ali came (back) from the Yemen to meet the Apostle in Mecca, he hurried to him and left in charge of his army one of his companions who went and covered every man in the force with clothes from the linen Ali had. When the army approached, he (Ali) went out to meet them and found them dressed in the clothes. When he asked what on earth had happened, the man (his deputee) said that he had dressed the men so that they might appear seemly when they mingle with the people. He (Ali) told him to take off the clothes before they came to the Apostle and they did so and put them back among the spoil(s). The army showed resentment at their treatment…when the men complained of Ali, the Apostle arose to address them and he (the narrator) heard him (the Prophet) say: “Do not blame Ali, for he is too scrupulous in the things of Allah, or in the way of Allah, to be blamed.”
(Ibn Ishaq, Seerah Rasool-Allah, p.650)
I have found the one you was refering to, Khalid is only negatively portrayed as far as i know in the shia version by al mufid, i reproduce it here from the gift2shias site.
"this incident is mentioned in Shia sources as well. Shaykh Mufid, the classical Shia scholar, writes:
(Earlier) the Commander of the Faithful had chosen a slave-girl from among the prisoners. Now Khalid sent Buraida to the Prophet. He said: “Get to (the Prophet) before the army does. Tell him what Ali has done in choosing a slave-girl for himself from the Khums and bring him dishonor…”
Buraida went to the Prophet. He (Buraida) had with him the letter from Khalid with which he had been sent. He began to read it. The face of the Prophet began to change.
“Apostle of Allah,” said Buraida, “if you permitted the people (to act) like this, their booty would disappear.”
“Woe upon you, Buraida,” the Prophet told him. “You have committed an act of hypocrisy. Ali ibn Abi Talib is allowed to have what is allowed to me from their booty…Buraida, I warn you that if you hate Ali, Allah will hate you.”
The sunni version In Bukhari and muslim
"Sahih Bukhari (volume 5, Book 59 Number 637):
Narrated Buraida:
The Prophet sent Ali to Khalid to bring the Khumus (of the booty) and I hated Ali, and Ali had taken a bath (after a sexual act with a slave-girl from the Khumus). I said to Khalid, “Don’t you see this (i.e. Ali)?” When we reached the Prophet, I mentioned that to him. He (the Prophet) said, “O Buraida! Do you hate Ali?” I said, “Yes.” He said, “Do you hate him, for he deserves more than that from the Khumus.”
so its hard to blame this on Khalid when it was buraida who made the complaint.