From 32d723c40d6fa959779f35973411185a320529d1 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Tue, 10 Mar 2020 22:05:57 +0100 Subject: [PATCH] Fix potential double free when using meshlink_add_invitation_address(). --- src/meshlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++; -- 2.39.5