diff options
author | Ondrej Filip <feela@network.cz> | 2004-06-01 15:44:53 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2004-06-01 15:44:53 +0200 |
commit | e8bf6c0766dba95c4b7ebb8b29dad31392f212b7 (patch) | |
tree | 7ff3e3c334f4aee904349fb4b1c94fdddc0a0d7e /proto/ospf/iface.c | |
parent | c9f6cf8a05aba6a79bfb57120ca48adcf8e3949d (diff) | |
download | bird-e8bf6c0766dba95c4b7ebb8b29dad31392f212b7.tar bird-e8bf6c0766dba95c4b7ebb8b29dad31392f212b7.zip |
Easier cleanup of an interface.
Diffstat (limited to 'proto/ospf/iface.c')
-rw-r--r-- | proto/ospf/iface.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index e7c63c4..f106a24 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -68,11 +68,8 @@ iface_chstate(struct ospf_iface *ifa, u8 state) } else { - if(ifa->dr_sk!=NULL) - { - rfree(ifa->dr_sk); - ifa->dr_sk=NULL; - } + rfree(ifa->dr_sk); + ifa->dr_sk=NULL; } if((oldstate==OSPF_IS_DR)&&(ifa->nlsa!=NULL)) { @@ -101,30 +98,15 @@ downint(struct ospf_iface *ifa) ospf_neigh_remove(n); } rem_node(NODE ifa); - if(ifa->hello_sk!=NULL) - rfree(ifa->hello_sk); - if(ifa->dr_sk!=NULL) - rfree(ifa->dr_sk); + rfree(ifa->hello_sk); + rfree(ifa->dr_sk); + rfree(ifa->ip_sk); - if(ifa->ip_sk!=NULL) - rfree(ifa->ip_sk); + rfree(ifa->wait_timer); + rfree(ifa->hello_timer); + rfree(ifa->poll_timer); - if(ifa->wait_timer!=NULL) - { - tm_stop(ifa->wait_timer); - rfree(ifa->wait_timer); - } - if(ifa->hello_timer!=NULL) - { - tm_stop(ifa->hello_timer); - rfree(ifa->hello_timer); - } - if(ifa->poll_timer!=NULL) - { - tm_stop(ifa->poll_timer); - rfree(ifa->poll_timer); - } rfree(ifa->lock); mb_free(ifa); } |