diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-06-13 17:34:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-06-13 17:48:15 +0200 |
commit | c4b6dda07fe6a7b6254a7968c346730455a85516 (patch) | |
tree | 40014196809e69cba1192ee87dcb226c72203cd3 /src/libsystemd-network/sd-radv.c | |
parent | 6f8a8b84f28be7a6133bbde1479dee9abad6cee8 (diff) | |
download | systemd-c4b6dda07fe6a7b6254a7968c346730455a85516.tar.gz systemd-c4b6dda07fe6a7b6254a7968c346730455a85516.tar.bz2 systemd-c4b6dda07fe6a7b6254a7968c346730455a85516.zip |
sd-radv: close fd when destroying object
Diffstat (limited to 'src/libsystemd-network/sd-radv.c')
-rw-r--r-- | src/libsystemd-network/sd-radv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c index cf7fe0997b..28da73c8d5 100644 --- a/src/libsystemd-network/sd-radv.c +++ b/src/libsystemd-network/sd-radv.c @@ -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); } |