When the student who wrote this was asked, he explained the reasoning:
"First, there was only the free and p=NULL. But then I thought maybe I insert the delete, just to be sure the memory gets deleted, But it didn't worked, so I tried a bit and the return helped make it working again."
Ciao, Imi.
PS: A friend's story.. but still funny enough :)
The almighty return keyword works its magic powers once again! Amazing how it can make the most complicated of programs finish without any problems... Almost like the supernatural exit() function.