From: Guus Sliepen Date: Tue, 10 Mar 2020 21:05:57 +0000 (+0100) Subject: Fix potential double free when using meshlink_add_invitation_address(). X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=32d723c40d6fa959779f35973411185a320529d1;p=meshlink Fix potential double free when using meshlink_add_invitation_address(). --- diff --git a/src/meshlink.c b/src/meshlink.c index 9f9b771d..6e7cda60 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -446,7 +446,7 @@ static char *get_my_hostname(meshlink_handle_t *mesh, uint32_t flags) { if(colon) { *colon = 0; - port[n] = colon + 1; + port[n] = xstrdup(colon + 1); } n++;