The momentary - and rather surprising - success of the Leg-Locking Curse provided a moment of breath, before the spider leapt once more. Ernie mentally yelled at himself for not having his wand ready, as he raised it, and opened his mouth to yell out a spell.
Before the words had left his mouth, he heard Daphne cast her spell, and the spider simply stopped, crashing to the ground. Imperio - an Unforgivable. Effective, admittedly, as the spider was now chewing off its own leg, but still an Unforgivable. He was certain that there wasn't protocol in the rule book that dealt with the use of Unforgivables on animals in the case of self-defence. And the action had saved them, and judging by the shocked look on Daphne's face, she hadn't been expecting it either.
When Daphne turned to look at him, Ernie spoke, subdued and shocked out of the pompousness he usually maintained. "Even without the protection provided for purebloods currently, they wouldn't send you to Azkaban - the law's decrees are for use on humans, and that was self-defence too. But I do have to tell the Headmistress." He felt it only appropriate to add, "I'm sorry." He was. It had quite probably saved their lives.