Cast output of malloc to char *