to make one's own affairs right, before or instead of criticizing someone else. (See also
put one's house in order.)
You should put your own house in order before criticizing someone else. I have to put my own house in order before I criticize others.