“At that moment Neville toppled into the common room. How he had managed to climb through the portrait hole was anyone’s guess, because his legs had been stuck together with what they recognised at once as the Leg-Locker Curse. He must have had to bunny hop all the way up to Gryffindor Tower. Everyone fell about laughing except Hermione, who leapt up and performed the counter-curse. Neville’s legs sprang apart and he got to his feet, trembling.”
―
J.K. Rowling,
Harry Potter: The Complete Collection