summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorDanny Jeongseok Seo <s.seo@samsung.com>2012-11-09 08:21:24 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-11-13 12:37:08 (GMT)
commitbe52978c5fb34e8570ba0c58d819fdf0bf7f3d49 (patch)
tree7e7442a1ed9d66029140cc140ef6f1512bacdbb8 /gdhcp
parent00168951f9d122b396a49166b40dff9c90fcdedd (diff)
downloadconnman-be52978c5fb34e8570ba0c58d819fdf0bf7f3d49.zip
connman-be52978c5fb34e8570ba0c58d819fdf0bf7f3d49.tar.gz
connman-be52978c5fb34e8570ba0c58d819fdf0bf7f3d49.tar.bz2
gdhcp: Fix resource leak
The socket was not closed when the sendto failed.
Diffstat (limited to 'gdhcp')
-rw-r--r--gdhcp/ipv4ll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdhcp/ipv4ll.c b/gdhcp/ipv4ll.c
index 17ab3d5..033ef81 100644
--- a/gdhcp/ipv4ll.c
+++ b/gdhcp/ipv4ll.c
@@ -111,7 +111,7 @@ int ipv4ll_send_arp_packet(uint8_t* source_eth, uint32_t source_ip,
n = sendto(fd, &p, sizeof(p), 0,
(struct sockaddr*) &dest, sizeof(dest));
if (n < 0)
- return -errno;
+ n = -errno;
close(fd);