platform: fix nm_platform_wireguard_peer_to_string()

Fixes: 62d14e1884
This commit is contained in:
Thomas Haller 2018-12-27 16:12:00 +01:00
parent a3d15d2d5a
commit 2ddfa5b265

View file

@ -5546,6 +5546,7 @@ nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize
const char *
nm_platform_wireguard_peer_to_string (const NMPWireGuardPeer *peer, char *buf, gsize len)
{
char *buf0 = buf;
gs_free char *public_key_b64 = NULL;
char s_endpoint[NM_UTILS_INET_ADDRSTRLEN + 100];
char s_addr[NM_UTILS_INET_ADDRSTRLEN];
@ -5595,7 +5596,7 @@ nm_platform_wireguard_peer_to_string (const NMPWireGuardPeer *peer, char *buf, g
allowed_ip->mask);
}
return buf;
return buf0;
}
const char *