[PATCH v3 2/7] common: Tidy up how malloc() is inited