summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2009-09-24 19:45:53 +0000
committerStef Walter <stef@memberwebs.com>2009-09-24 19:45:53 +0000
commit5d9c6850cf8f0d43ad2fc4ad85dd34560b06d897 (patch)
tree12e539f746a0d37fac0e514c2df7ed02e6771fa9 /common
parent0c4768bc3ffe30c6ab6f7b40274e41d5f611cc38 (diff)
Fix memory leak on exit.
Memory leak on exit (not a big deal) where host->prepared was not freed.
Diffstat (limited to 'common')
-rw-r--r--common/snmp-engine.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/snmp-engine.c b/common/snmp-engine.c
index 9f85321..bb5d2fa 100644
--- a/common/snmp-engine.c
+++ b/common/snmp-engine.c
@@ -62,6 +62,9 @@ struct request;
typedef uint64_t mstime;
+/* Forward declarations */
+static void request_release (struct request *req);
+
/* ------------------------------------------------------------------------------
* HOSTS
*/
@@ -295,6 +298,8 @@ host_cleanup (void)
free (host->hostname);
if (host->community)
free (host->community);
+ if (host->prepared)
+ request_release (host->prepared);
free (host);
}