1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

Merge pull request from yuwata/fix-network-memleak2

fix networkd memleak and voidify several function calls
This commit is contained in:
Lennart Poettering 2018-07-20 12:38:49 +02:00 committed by GitHub
commit 48a0ab391c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -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);

View File

@ -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)

View File

@ -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)