diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-05 05:53:07 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-05 05:53:07 +0200 |
commit | 409adfc2256d483b43b4cf92025e575212ea3372 (patch) | |
tree | deb90e5b3a5718f77d0c4027510894f9587c4b9a /interface-ip.c | |
parent | 818abd9f2f42c36a0f91ff6d29a9a635398216e0 (diff) |
free routes and addresses
Diffstat (limited to 'interface-ip.c')
-rw-r--r-- | interface-ip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/interface-ip.c b/interface-ip.c index 6decaea..b86acb5 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -34,6 +34,7 @@ void interface_del_address(struct interface *iface, struct device_addr *addr) list_del(&addr->list); system_del_address(iface->l3_iface->dev, addr); + free(addr); } void interface_del_ctx_addr(struct interface *iface, void *ctx) @@ -58,6 +59,8 @@ void interface_del_route(struct interface *iface, struct device_route *route) { list_del(&route->list); system_del_route(iface->l3_iface->dev, route); + if (!route->keep) + free(route); } void interface_del_all_routes(struct interface *iface) |