mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-26 10:03:40 +03:00
network: free Route object when route_remove() fails
When route_remove() succeeds, the Route object will be freed later by manager_rtnl_process_route().
This commit is contained in:
parent
423c249c2e
commit
d6ad41e27d
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user