# HG changeset patch # User jbe # Date 1608494261 -3600 # Node ID a8b1012856a50759fe6aaf57e812c7cf3d167444 # Parent 4379766473ecc6626a8cf1d2ef08dd2fb6773ba0 Bugfix: Do not use freeaddrinfo() if getaddrinfo() failed diff -r 4379766473ec -r a8b1012856a5 moonbridge_io.c --- a/moonbridge_io.c Tue Jun 23 12:25:58 2020 +0200 +++ b/moonbridge_io.c Sun Dec 20 20:57:41 2020 +0100 @@ -1188,7 +1188,6 @@ hints.ai_flags = AI_ADDRCONFIG; errcode = getaddrinfo(host, port, &hints, &res); if (errcode) { - freeaddrinfo(res); if (errcode == EAI_SYSTEM) { moonbr_io_prepare_errmsg(); lua_pushnil(L); @@ -1306,7 +1305,6 @@ hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE; errcode = getaddrinfo(host, port, &hints, &res); if (errcode) { - freeaddrinfo(res); if (errcode == EAI_SYSTEM) { moonbr_io_prepare_errmsg(); lua_pushnil(L);