sd-radv: close fd when destroying object

This commit is contained in:
Lennart Poettering 2018-06-13 17:34:09 +02:00
parent 6f8a8b84f2
commit c4b6dda07f

View File

@ -77,6 +77,7 @@ _public_ sd_event *sd_radv_get_event(sd_radv *ra) {
}
static void radv_reset(sd_radv *ra) {
assert(ra);
ra->timeout_event_source =
sd_event_source_unref(ra->timeout_event_source);
@ -120,6 +121,9 @@ _public_ sd_radv *sd_radv_unref(sd_radv *ra) {
radv_reset(ra);
sd_radv_detach_event(ra);
ra->fd = safe_close(ra->fd);
return mfree(ra);
}