mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
Merge pull request #9659 from yuwata/fix-network-memleak2
fix networkd memleak and voidify several function calls
This commit is contained in:
commit
48a0ab391c
src
@ -1386,9 +1386,9 @@ int manager_new(Manager **ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
sd_event_set_watchdog(m->event, true);
|
||||
sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
|
||||
sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
|
||||
(void) sd_event_set_watchdog(m->event, true);
|
||||
(void) sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
|
||||
(void) sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
|
||||
|
||||
r = sd_event_add_post(m->event, NULL, manager_dirty_handler, m);
|
||||
if (r < 0)
|
||||
@ -1474,6 +1474,7 @@ void manager_free(Manager *m) {
|
||||
set_free_with_destructor(m->rules_saved, routing_policy_rule_free);
|
||||
|
||||
sd_netlink_unref(m->rtnl);
|
||||
sd_netlink_unref(m->genl);
|
||||
sd_event_unref(m->event);
|
||||
|
||||
sd_resolve_unref(m->resolve);
|
||||
|
@ -594,10 +594,10 @@ int manager_new(Manager **ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
|
||||
sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
|
||||
(void) sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
|
||||
(void) sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
|
||||
|
||||
sd_event_set_watchdog(m->event, true);
|
||||
(void) sd_event_set_watchdog(m->event, true);
|
||||
|
||||
r = manager_watch_hostname(m);
|
||||
if (r < 0)
|
||||
|
@ -1101,10 +1101,10 @@ int manager_new(Manager **ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
|
||||
sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
|
||||
(void) sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
|
||||
(void) sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
|
||||
|
||||
sd_event_set_watchdog(m->event, true);
|
||||
(void) sd_event_set_watchdog(m->event, true);
|
||||
|
||||
r = sd_resolve_default(&m->resolve);
|
||||
if (r < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user