-free(msg); +Safefree(msg); -char *thread_arg = malloc((strlen(msg)+1)*sizeof(char)); +char *thread_arg; +Newx(thread_arg, strlen(msg)+1, char);