In an interview, J.K. Rowling suggests that Harry might be killed in the final book of the series. She notes that two characters end up dying who she hadn't originally planned to have die, while one gets a reprieve. She also mentions that there would be deaths would be among "main characters".
Personally, I think that Harry, Ron, and Hermione (and Ginny, for that matter) all get out alive. I expect that the casualties will be McGonigle and Hagrid, while the one getting the reprieve is Snape.