With regards to walking the only advantage a treadmill offers is convenience with regards to time, space and weather.
It's easily available at most gyms and you can get some minutes of walking on it post your workout or before your workout.
When it comes to running it is stressful on your knee joints. But then so is running outdoors on hard surfaces.
Moreover cardio is something that should be used sparingly when one is looking to get in shape. It should not be the primary focus.