In Islam nobody is infallible unless Allah has told us so.
In the sunni perspective only Messengers and prophets () are infallible in what ever they need to transfer the message of Allah, but as humans they might be fallible.
When it comes to justice and verdicts we are often told and asked in Qur'an to apply justice no matter what comes, read for example:
Indeed, Allah commands you to render trusts to whom they are due and when you judge between people to judge with justice. Excellent is that which Allah instructs you. Indeed, Allah is ever Hearing and Seeing. (4:58)
O you who have believed, be persistently standing firm for Allah , witnesses in justice, and do not let the hatred of a people prevent you from being just. Be just; that is nearer to righteousness. And fear Allah ; indeed, Allah is Acquainted with what you do. (5:8)
Indeed, Allah orders justice and good conduct and giving to relatives and forbids immorality and bad conduct and oppression. He admonishes you that perhaps you will be reminded. (16:90)
The prophet () told his companions () who were to teach other about Islam and who may be asked for fatwas to do efforts and informed them that they may either be correct or wrong:
When a judge gives a decision, having tried his best to decide correctly and is right, there are two rewards for him; and if he gave a judgment after having tried his best (to arrive at a correct decision) but erred, there is one reward for him.
(Sahih al-Bukhari, Sahih Muslim, Sunan abu Daowd, Sunan ibn Majah, Sunan an-Nasa-i and Jami' at-Tirmdihi)
The above hadith should already show that fatwas can be corrected. As they might be correct or wrong.
He also questioned them and tested them in how would they do to speak out verdict:
When the Messenger of Allah (ﷺ) intended to send Mu'adh ibn Jabal to the Yemen, he asked: How will you judge when the occasion of deciding a case arises?
He replied: I shall judge in accordance with Allah's Book. He asked: (What will you do) if you do not find any guidance in Allah's Book? He replied: (I shall act) in accordance with the Sunnah of the Messenger of Allah (ﷺ).
He asked: (What will you do) if you do not find any guidance in the Sunnah of the Messenger of Allah (ﷺ) and in Allah's Book?
He replied: I shall do my best to form an opinion and I shall spare no effort.
The Messenger of Allah (ﷺ) then patted him on the breast and said: Praise be to Allah Who has helped the messenger of the Messenger of Allah to find something which pleases the Messenger of Allah. (Sunan abi Daowd)
Therefore 'Omar ibn al-Khattab () wrote to his governor and judge -the known companion- abu Musa al-Ash'ari ():
" أَمَّا بَعْدُ لا يَمْنَعْكَ قَضَاءٌ قَضَيْتَهُ بِالأَمْسِ رَاجَعْتَ الْحَقَّ ، فَإِنَّ الْحَقَّ قَدِيمٌ ، لا يُبْطِلُ الْحَقَّ شَيْءٌ ، وَمُرَاجَعَةُ الْحَقِّ خَيْرٌ مِنَ التَّمَادِي فِي الْبَاطِلِ "
(Sunan al-Bayhaqi al-Kubra who commented that it is also quoted by Imam Ahmad and a similar quote can be found in a longer version in Sunan ad-Daraqotni)
My own translation take it carefully
Don't let a verdict you have made yesterday and you came to a result that is closer to truth, as is (but revert or correct it), because the truth is old, and nothing cannot be invalidated by anything. And reviewing and correcting (a verdict) to truth is better than staying (or keeping) falsehood.
Allah the almighty said:
And say, "Truth has come, and falsehood has departed. Indeed is falsehood, [by nature], ever bound to depart." (17:81)
And therefore the Messenger of Allah () said there are three kinds of jduges and two of them will end up in hell:
The Prophet (ﷺ) said: Judges are of three types, one of whom will go to Paradise and two to Hell. The one who will go to Paradise is a man who knows what is right and gives judgment accordingly; but a man who knows what is right and acts tyrannically in his judgment will go to Hell; and a man who gives judgment for people when he is ignorant will go to Hell.
Abu Dawud said: On this subject this is the soundest tradition, that is, the tradition of Ibn Buraidah: Judges are of three types. (Sunan abi Dawod)