diff options
author | Danny Jeongseok Seo <s.seo@samsung.com> | 2012-11-09 17:21:24 +0900 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-11-13 14:37:08 +0200 |
commit | be52978c5fb34e8570ba0c58d819fdf0bf7f3d49 (patch) | |
tree | 7e7442a1ed9d66029140cc140ef6f1512bacdbb8 /gdhcp | |
parent | 00168951f9d122b396a49166b40dff9c90fcdedd (diff) | |
download | connman-be52978c5fb34e8570ba0c58d819fdf0bf7f3d49.tar.gz connman-be52978c5fb34e8570ba0c58d819fdf0bf7f3d49.tar.bz2 connman-be52978c5fb34e8570ba0c58d819fdf0bf7f3d49.zip |
gdhcp: Fix resource leak
The socket was not closed when the sendto failed.
Diffstat (limited to 'gdhcp')
-rw-r--r-- | gdhcp/ipv4ll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdhcp/ipv4ll.c b/gdhcp/ipv4ll.c index 17ab3d59..033ef816 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); |