On the stability of a spring-pendulum