moonbridge

changeset 327:a8b1012856a5 v1.1.2

Bugfix: Do not use freeaddrinfo() if getaddrinfo() failed
author jbe
date Sun Dec 20 20:57:41 2020 +0100 (11 months ago)
parents 4379766473ec
children 86121074cd91
files moonbridge_io.c
line diff
     1.1 --- a/moonbridge_io.c	Tue Jun 23 12:25:58 2020 +0200
     1.2 +++ b/moonbridge_io.c	Sun Dec 20 20:57:41 2020 +0100
     1.3 @@ -1188,7 +1188,6 @@
     1.4    hints.ai_flags = AI_ADDRCONFIG;
     1.5    errcode = getaddrinfo(host, port, &hints, &res);
     1.6    if (errcode) {
     1.7 -    freeaddrinfo(res);
     1.8      if (errcode == EAI_SYSTEM) {
     1.9        moonbr_io_prepare_errmsg();
    1.10        lua_pushnil(L);
    1.11 @@ -1306,7 +1305,6 @@
    1.12    hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE;
    1.13    errcode = getaddrinfo(host, port, &hints, &res);
    1.14    if (errcode) {
    1.15 -    freeaddrinfo(res);
    1.16      if (errcode == EAI_SYSTEM) {
    1.17        moonbr_io_prepare_errmsg();
    1.18        lua_pushnil(L);

Impressum / About Us