X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fsubnet.c;h=7fffe633c4ce377aeae9400c1536a00d20980c80;hp=f010e4ead64458875a4d97477ad53aa93e4c3fb5;hb=63f8303a5dc1758876451a580a8317dbc3d295d6;hpb=6d08eb1614b59d5f86a43edda9db06fca72b76cd diff --git a/src/subnet.c b/src/subnet.c index f010e4ea..7fffe633 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -273,7 +273,7 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { bool net2str(char *netstr, int len, const subnet_t *subnet) { if(!netstr || !subnet) { - logger(LOG_ERR, "net2str() was called with netstr=%p, subnet=%p!\n", netstr, subnet); + logger(LOG_ERR, "net2str() was called with netstr=%p, subnet=%p!", netstr, subnet); return false; } @@ -468,6 +468,8 @@ void subnet_update(node_t *owner, subnet_t *subnet, bool up) { // 4 and 5 are reserved for SUBNET and WEIGHT xasprintf(&envp[6], "REMOTEADDRESS=%s", address); xasprintf(&envp[7], "REMOTEPORT=%s", port); + free(port); + free(address); } name = up ? "subnet-up" : "subnet-down";