From: Guus Sliepen Date: Sat, 15 Jan 2011 22:02:46 +0000 (+0100) Subject: Fix memory leak when updating subnet reachability. X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=9f73c9e4c82450961010d05263e14edce12c27d7 Fix memory leak when updating subnet reachability. --- diff --git a/src/subnet.c b/src/subnet.c index 2d1f43a3..b8da0927 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -469,6 +469,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(address); + free(port); } name = up ? "subnet-up" : "subnet-down";