summaryrefslogtreecommitdiffstats
path: root/src/table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/table.c')
-rw-r--r--src/table.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/table.c b/src/table.c
index e4c61aa..3201d40 100644
--- a/src/table.c
+++ b/src/table.c
@@ -232,6 +232,8 @@ int nftnl_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_table *t)
if (tb[NFTA_TABLE_NAME]) {
xfree(t->name);
t->name = strdup(mnl_attr_get_str(tb[NFTA_TABLE_NAME]));
+ if (!t->name)
+ return -1;
t->flags |= (1 << NFTNL_TABLE_NAME);
}
if (tb[NFTA_TABLE_FLAGS]) {