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);
sd_event_source_unref(route->expire);
- free(route);
+ return mfree(route);
}
void route_hash_func(const Route *route, struct siphash *state) {
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);