diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-07 11:06:27 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-08 02:51:23 +0900 |
commit | d6ad41e27d37518ce9068a74dcd9380de90ee4a9 (patch) | |
tree | 8874999ae84c494952b51e30b3b838f7a6f42e86 /src/network | |
parent | 423c249c2e01b613e4cc6bdcdf9648ac89f01ace (diff) | |
download | systemd-d6ad41e27d37518ce9068a74dcd9380de90ee4a9.tar.gz |
network: free Route object when route_remove() fails
When route_remove() succeeds, the Route object will be freed later by
manager_rtnl_process_route().
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 5df5f8fb6c..feb62ee783 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -760,10 +760,10 @@ static int route_expire_handler(sd_event_source *s, uint64_t usec, void *userdat assert(route); r = route_remove(route, route->manager, route->link, NULL); - if (r < 0) + if (r < 0) { log_link_warning_errno(route->link, r, "Could not remove route: %m"); - else route_free(route); + } return 1; } |