summaryrefslogtreecommitdiff
path: root/src/dnsproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnsproxy.c')
-rwxr-xr-xsrc/dnsproxy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index f5ec5021..6e1870f6 100755
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -2586,7 +2586,7 @@ static void destroy_server_sec(struct server_data *server)
GList *list;
int fd;
- if(server->channel)
+ if (server->channel)
fd = g_io_channel_unix_get_fd(server->channel);
else
fd = -1;
@@ -2594,8 +2594,10 @@ static void destroy_server_sec(struct server_data *server)
DBG("index %d server %s sock %d", server->index, server->server, fd);
server_list_sec = g_slist_remove(server_list_sec, server);
- if(fd > 0)
+
+ if (fd > 0)
close(fd);
+
server_destroy_socket(server);
if (server->protocol == IPPROTO_UDP && server->enabled)