Previously, manager_free() did not assign NULL to Manager.sysctl_shadow,
hence sysctl_clear_link_shadows() called by link_free() will causes
use-after-free. To fix the issue, this makes Manager.sysctl_shadow will be
set to NULL after it is freed,
Fixes a bug introduced by
6d9ef22acdeac4b429efb75164341233955484af.
HASHMAP_FOREACH(link, m->links_by_index)
(void) link_stop_engines(link, true);
- hashmap_free(m->sysctl_shadow);
+ m->sysctl_shadow = hashmap_free(m->sysctl_shadow);
m->request_queue = ordered_set_free(m->request_queue);
m->remove_request_queue = ordered_set_free(m->remove_request_queue);