summaryrefslogtreecommitdiffstats
path: root/src/rtnl.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-05-25 20:30:23 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2008-05-25 20:30:23 +0200
commit36d2ed3de20a37a1d5a970596e3f672537c36f49 (patch)
tree47262af42ddb7e5f55dac42a2610a6ced4b3237a /src/rtnl.c
parent78437ef8c86075d2621d954fdf77d255df798267 (diff)
major cleanup of index2name infrastructure: use linux list (and fix leak in the nlif_close path)
Diffstat (limited to 'src/rtnl.c')
-rw-r--r--src/rtnl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rtnl.c b/src/rtnl.c
index 0206d30..29fc184 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -91,9 +91,10 @@ int rtnl_handler_unregister(struct rtnl_handle *rtnl_handle,
return 0;
}
-/* rtnl_arse_rtattr - parse rtattr */
int rtnl_parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len)
{
+ memset(tb, 0, sizeof(struct rtattr *) * max);
+
while (RTA_OK(rta, len)) {
if (rta->rta_type <= max)
tb[rta->rta_type] = rta;