remove unnecessary malloc()