Fix bad checking of the return of realloc(3)
Reported by: Coverity CID: 1007335 MFC after: 3 days
This commit is contained in:
parent
11a5d8cc21
commit
d0f2726865
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user