diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-12-06 14:04:12 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2012-01-02 17:14:17 +0400 |
commit | ed269db39a167251f9b7e8e261c7f53902c094f9 (patch) | |
tree | 9b5de1634c4434f87d7ee67f28483a1379915a90 /lib | |
parent | ce77002e908e8c9eeff780a6a34143af6758a17f (diff) |
lib: call filter delete hook before freeing access list
The delete_hook was being run after calling access list delete function.
This would cause ospf to dereference a NULL, in ospf_filter_update
because 'access->name' was already freed.
See also:
https://bugzilla.vyatta.com/show_bug.cgi?id=7654
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filter.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/filter.c b/lib/filter.c index af8d587f..69341824 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -1337,13 +1337,13 @@ DEFUN (no_access_list_all, master = access->master; - /* Delete all filter from access-list. */ - access_list_delete (access); - /* Run hook function. */ if (master->delete_hook) (*master->delete_hook) (access); + /* Delete all filter from access-list. */ + access_list_delete (access); + return CMD_SUCCESS; } @@ -1508,13 +1508,13 @@ DEFUN (no_ipv6_access_list_all, master = access->master; - /* Delete all filter from access-list. */ - access_list_delete (access); - /* Run hook function. */ if (master->delete_hook) (*master->delete_hook) (access); + /* Delete all filter from access-list. */ + access_list_delete (access); + return CMD_SUCCESS; } |