in bridge and arp families, some tables such as security do not exist,
so name is NULL. skip them, else we segfault in strcmp.
Signed-off-by: Florian Westphal <fw@strlen.de>
cur_table = h->tables[i].name;
chains = h->tables[i].chains;
- if (strcmp(table, cur_table) != 0)
+ if (!cur_table || strcmp(table, cur_table) != 0)
continue;
for (j = 0; j < NF_INET_NUMHOOKS && chains[j].name; j++) {
int ret = 0, i;
for (i = 0; i < TABLES_MAX; i++) {
+ if (!h->tables[i].name)
+ continue;
if (strcmp(h->tables[i].name, tablename) == 0)
break;
}