From: Roy Marples Date: Tue, 2 Sep 2014 13:53:16 +0000 (+0000) Subject: Close the sockets after shutting them down. X-Git-Tag: v6.4.4~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3bf40550f18d7e6b801a81118423d99b1d02f50;p=thirdparty%2Fdhcpcd.git Close the sockets after shutting them down. --- diff --git a/control.c b/control.c index 399ee121..435e7345 100644 --- a/control.c +++ b/control.c @@ -215,6 +215,7 @@ control_stop(struct dhcpcd_ctx *ctx) eloop_event_delete(ctx->eloop, ctx->control_fd); if (shutdown(ctx->control_fd, SHUT_RDWR) == -1) retval = 1; + close(ctx->control_fd); ctx->control_fd = -1; if (unlink(ctx->control_sock) == -1) retval = -1; @@ -224,6 +225,7 @@ control_stop(struct dhcpcd_ctx *ctx) ctx->control_fds = l->next; eloop_event_delete(ctx->eloop, l->fd); shutdown(l->fd, SHUT_RDWR); + close(l->fd); free(l); l = ctx->control_fds; }