summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/polypcore/socket-client.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/polypcore/socket-client.c b/src/polypcore/socket-client.c
index fd840ab5..efb6de9a 100644
--- a/src/polypcore/socket-client.c
+++ b/src/polypcore/socket-client.c
@@ -376,16 +376,18 @@ static void asyncns_cb(pa_mainloop_api*m, pa_io_event *e, int fd, PA_GCC_UNUSED
asyncns_freeaddrinfo(res);
- goto finish;
-
+ m->io_free(c->asyncns_io_event);
+ c->asyncns_io_event = NULL;
+ return;
+
fail:
+ m->io_free(c->asyncns_io_event);
+ c->asyncns_io_event = NULL;
+
errno = EHOSTUNREACH;
do_call(c);
+ return;
-finish:
-
- m->io_free(c->asyncns_io_event);
- c->asyncns_io_event = NULL;
}
#endif