diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 36b4fe3bd2d7..9ec450b5bd27 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -8075,13 +8075,13 @@ ipf_nat_rehash(softc, t, p) * the outbound lookup table and the hash chain length for each. */ KMALLOCS(newtab[0], nat_t **, newsize * sizeof(nat_t *)); - if (newtab == NULL) { + if (newtab[0] == NULL) { error = 60063; goto badrehash; } KMALLOCS(newtab[1], nat_t **, newsize * sizeof(nat_t *)); - if (newtab == NULL) { + if (newtab[1] == NULL) { error = 60064; goto badrehash; }