summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-02-12 10:29:06 +0000
committerRoy Marples <roy@marples.name>2014-02-12 10:29:06 +0000
commite9882fb08a128b28c7fd1a203bfff0db911ce0cc (patch)
tree35abf052aa4d59507e3b773b5ddd7fc9a9b2e573 /dhcpcd.c
parent60dad20dbdd955c1a781f4a860736d9535d544cb (diff)
downloaddhcpcd-e9882fb08a128b28c7fd1a203bfff0db911ce0cc.tar.xz
Ensure we remove the socket from the eloop event queue before closing it.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 0a684c73..51e4525b 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1480,8 +1480,10 @@ exit1:
free(ctx.ifaces);
}
free(ctx.duid);
- if (ctx.link_fd != -1)
+ if (ctx.link_fd != -1) {
+ eloop_event_delete(ctx.eloop, ctx.link_fd);
close(ctx.link_fd);
+ }
free_options(ifo);
free_globals(&ctx);