Rigid body Sticks to Walls

Implementing my own character controller, things are going well except… My player was sticking to walls. So what I did was create a physics material and set the friction to 0. I then applied that material to both the player and the walls. Now he no longer sticks but if he jumps up right beside the wall he keeps jumping, sort of like sliding up the wall. How do I stop this?

Its correct use a physics material, but for the problem you can keep jumping, you need check if you are in the ground before do the jump, you can do this with: OverLapPoint in 2D, CheckSphere in 3D or just a RayCast.