45be165f23
The strchr(3) returns a NULL if the character does not appears in the string. The malloc will return NULL if cannot allocate memory.