In free(): if ptr is a null pointer, no action occurs. No need to check 'm->friendlist[i].statusmessage'