]> tinc-vpn.org Git - tinc/commitdiff
Fix memory leak when updating subnet reachability.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 15 Jan 2011 22:02:46 +0000 (23:02 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 15 Jan 2011 22:02:46 +0000 (23:02 +0100)
src/subnet.c

index 2d1f43a33632f85a54644392b4315c72cb5a59e2..b8da09275295129120c230164fb1855ebdb21722 100644 (file)
@@ -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";