From 36d2ed3de20a37a1d5a970596e3f672537c36f49 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 25 May 2008 20:30:23 +0200 Subject: major cleanup of index2name infrastructure: use linux list (and fix leak in the nlif_close path) --- src/rtnl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rtnl.c') 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; -- cgit v1.2.3