She had formed a special bond with Madam Pomfrey, after being petrified by the basilisk in the second year. And after quickly explaining that she wanted to check on Malfoy, she was let in to see him. 