summaryrefslogtreecommitdiff
path: root/gdhcp/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdhcp/common.c')
-rw-r--r--gdhcp/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdhcp/common.c b/gdhcp/common.c
index 43f67355..0a2b51bd 100644
--- a/gdhcp/common.c
+++ b/gdhcp/common.c
@@ -343,11 +343,11 @@ int dhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
*/
n = sendto(fd, &packet, IP_UPD_DHCP_SIZE, 0,
(struct sockaddr *) &dest, sizeof(dest));
+ close(fd);
+
if (n < 0)
return -errno;
- close(fd);
-
return n;
}