Fix bad checking of the return of realloc(3)

Reported by:	Coverity
CID:		1007335
MFC after:	3 days
This commit is contained in:
bapt 2016-04-20 20:56:06 +00:00
parent 11a5d8cc21
commit d0f2726865

View File

@ -207,7 +207,7 @@ decolonify(char *s, ccharp **cppp, int *ip)
*cp = '\0';
if (strlen(s) && !contains(*cppp, s)) {
*cppp = realloc(*cppp, (*ip + 2) * sizeof(char *));
if (cppp == NULL)
if (*cppp == NULL)
abort();
(*cppp)[*ip] = s;
(*cppp)[*ip + 1] = NULL;