X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=src%2Fprotocol_misc.c;h=727881bd1080476d2c5d9303b76d315f702cc2a0;hb=dc68da94af8fca91748579c84ef5ed798db7efab;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; }