summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2011-10-28 12:28:59 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2011-10-28 23:41:30 +0200
commitadf8327243aba249cd3b50690c2ca369fafaee8d (patch)
tree4d8203346c6f5d3805de75d6f34b1b31a3183b0a /gdhcp
parent3198dcb0a7f46edbe217c648fce46177375955a9 (diff)
downloadconnman-adf8327243aba249cd3b50690c2ca369fafaee8d.tar.gz
connman-adf8327243aba249cd3b50690c2ca369fafaee8d.tar.bz2
connman-adf8327243aba249cd3b50690c2ca369fafaee8d.zip
gdhcp: Possible file descriptor leak
Diffstat (limited to 'gdhcp')
-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;
}