Fix a forgotten malloc and replace it with TRI_Allocate.