diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-12-06 14:04:12 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-12-06 15:02:34 +0400 |
commit | 6a2e0f36b103386e57dbe3a6ee4716e809111198 (patch) | |
tree | 2cfdd15813caa8b83ea3b98731a6f7a92db7e9c5 /lib | |
parent | ce0af6ff5a4f200035ed4134da72a67f49a21dd6 (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; } |