mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
network: make route_free() return NULL
This commit is contained in:
parent
4468f01b67
commit
169948e9d2
@ -128,9 +128,9 @@ static int route_new_static(Network *network, const char *filename, unsigned sec
|
||||
return 0;
|
||||
}
|
||||
|
||||
void route_free(Route *route) {
|
||||
Route *route_free(Route *route) {
|
||||
if (!route)
|
||||
return;
|
||||
return NULL;
|
||||
|
||||
if (route->network) {
|
||||
LIST_REMOVE(routes, route->network->static_routes, route);
|
||||
@ -164,7 +164,7 @@ void route_free(Route *route) {
|
||||
|
||||
sd_event_source_unref(route->expire);
|
||||
|
||||
free(route);
|
||||
return mfree(route);
|
||||
}
|
||||
|
||||
void route_hash_func(const Route *route, struct siphash *state) {
|
||||
|
@ -67,7 +67,7 @@ int route_compare_func(const Route *a, const Route *b);
|
||||
extern const struct hash_ops route_hash_ops;
|
||||
|
||||
int route_new(Route **ret);
|
||||
void route_free(Route *route);
|
||||
Route *route_free(Route *route);
|
||||
int route_configure(Route *route, Link *link, link_netlink_message_handler_t callback, Route **ret);
|
||||
int route_remove(Route *route, Link *link, link_netlink_message_handler_t callback);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user