helper/command: check for malloc failure in __command_name