diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c index f5d8b0f05e6f..6864e7b71e59 100644 --- a/usr.bin/whereis/whereis.c +++ b/usr.bin/whereis/whereis.c @@ -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;