From 5d9c6850cf8f0d43ad2fc4ad85dd34560b06d897 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 24 Sep 2009 19:45:53 +0000 Subject: Fix memory leak on exit. Memory leak on exit (not a big deal) where host->prepared was not freed. --- common/snmp-engine.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- cgit v1.2.3