Remove unnecessary malloc.