diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-02-14 08:37:41 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-02-14 08:37:41 +0100 |
commit | 8de88140f54ebcfeab1d2962c115e1fdf6f8c3f0 (patch) | |
tree | bfbaab2748a891aba06e4c754c4eadbfb7fc17f1 | |
parent | 71aca1ad157dabd5cc0bef8060022d60a637c605 (diff) | |
download | ponymap-8de88140f54ebcfeab1d2962c115e1fdf6f8c3f0.tar.gz ponymap-8de88140f54ebcfeab1d2962c115e1fdf6f8c3f0.tar.xz ponymap-8de88140f54ebcfeab1d2962c115e1fdf6f8c3f0.zip |
Fix resource leak
-rw-r--r-- | ponymap.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -720,9 +720,12 @@ unit_make (struct target *target, uint32_t ip, uint16_t port, else if (errno == EINPROGRESS) connected = false; else + { + xclose (socket_fd); return errno == EADDRNOTAVAIL ? UNIT_MAKE_TRY_AGAIN : UNIT_MAKE_ERROR; + } struct unit *u; if (!(u = unit_new (target, socket_fd, port, service, transport))) |