Walking is a continuous process of transiting from stable position to falling forward and gaining stability again. Work done by friction is 0, since the point of contact is stationary. The work done by the man's leg muscles is positive, since the rear leg is stopped by friction from sliding, and acts as a temporary support, while the front leg swings forward (facilitated by the leg muscles) and then the whole body moves to the stable position ahead.