X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_misc.c;fp=src%2Fprotocol_misc.c;h=727881bd1080476d2c5d9303b76d315f702cc2a0;hb=b67296418c51784d39a24c3041e2cb199bee06f2;hp=5ec01d9253405e82849779905f02b66a42bf0ee0;hpb=f79cc0e0bba16a3aa42a5fa13098cda714623205;p=meshlink diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 5ec01d92..727881bd 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -94,8 +94,11 @@ bool pong_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { if(c->outgoing) { c->outgoing->timeout = 0; c->outgoing->cfg = NULL; - if(c->outgoing->ai) + + if(c->outgoing->ai) { freeaddrinfo(c->outgoing->ai); + } + c->outgoing->ai = NULL; c->outgoing->aip = NULL; }