From 9f73c9e4c82450961010d05263e14edce12c27d7 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 15 Jan 2011 23:02:46 +0100 Subject: [PATCH] Fix memory leak when updating subnet reachability. --- src/subnet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/subnet.c b/src/subnet.c index 2d1f43a..b8da092 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"; -- 2.25.1