Homogenous capitalisation.
Free cleanup.
lowercase
Unchecked malloc should be xmalloc.