From 2b21c2d608da80d93e1e2df8090ba95f25f87f68 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 28 May 2020 06:17:19 +0100 Subject: [PATCH] async-dns: callback should leave caller deletion to caller The guy calling the callback with LADNS_RET_FAILED is going to inform his caller that it failed... let him decide to close and fail the connection attempt. --- lib/roles/http/client/client-handshake.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/roles/http/client/client-handshake.c b/lib/roles/http/client/client-handshake.c index be5a761c0..9983bb12f 100644 --- a/lib/roles/http/client/client-handshake.c +++ b/lib/roles/http/client/client-handshake.c @@ -467,7 +467,11 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads, #if defined(LWS_WITH_SYS_ASYNC_DNS) if (n == LADNS_RET_FAILED) { lwsl_notice("%s: adns failed %s\n", __func__, ads); - goto oom4; + /* + * Caller that is giving us LADNS_RET_FAILED will deal + * with cleanup + */ + return NULL; } #endif