diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2011-10-28 12:28:59 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-10-28 23:41:30 +0200 |
commit | adf8327243aba249cd3b50690c2ca369fafaee8d (patch) | |
tree | 4d8203346c6f5d3805de75d6f34b1b31a3183b0a /gdhcp | |
parent | 3198dcb0a7f46edbe217c648fce46177375955a9 (diff) | |
download | connman-adf8327243aba249cd3b50690c2ca369fafaee8d.tar.gz connman-adf8327243aba249cd3b50690c2ca369fafaee8d.tar.bz2 connman-adf8327243aba249cd3b50690c2ca369fafaee8d.zip |
gdhcp: Possible file descriptor leak
Diffstat (limited to 'gdhcp')
-rw-r--r-- | gdhcp/common.c | 4 |
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; } |