From 34a6841e024911e983d0bd3697e80229f5d3bc0d Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 7 Jul 2008 19:58:31 -0400 Subject: - free the domain list after the last domain's maps are gone --- src/map.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/map.c b/src/map.c index 3fd02ad..edfb38a 100644 --- a/src/map.c +++ b/src/map.c @@ -721,6 +721,11 @@ map_data_unset_map(struct plugin_state *state, } } } + /* And if we're down to no domains, free the domain list, too. */ + if (map_data.n_domains == 0) { + free(map_data.domains); + map_data.domains = NULL; + } } /* Add a map structure, adding a domain for it if necessary. */ -- cgit