void link_lldp_emit_stop(Link *link) {
assert(link);
- link->lldp_emit_event_source = sd_event_source_unref(link->lldp_emit_event_source);
+ link->lldp_emit_event_source = sd_event_source_disable_unref(link->lldp_emit_event_source);
}
static const char * const lldp_emit_table[_LLDP_EMIT_MAX] = {
ordered_set_free_with_destructor(route->multipath_routes, multipath_route_free);
- sd_event_source_unref(route->expire);
+ sd_event_source_disable_unref(route->expire);
return mfree(route);
}
}
static int route_add_and_setup_timer_one(Link *link, const Route *route, const MultipathRoute *m, const NextHop *nh, uint8_t nh_weight, Route **ret) {
- _cleanup_(sd_event_source_unrefp) sd_event_source *expire = NULL;
+ _cleanup_(sd_event_source_disable_unrefp) sd_event_source *expire = NULL;
Route *nr;
int r;
return log_link_error_errno(link, r, "Could not arm expiration timer: %m");
}
- sd_event_source_unref(nr->expire);
+ sd_event_source_disable_unref(nr->expire);
nr->expire = TAKE_PTR(expire);
*ret = nr;