summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/map.c5
1 files changed, 5 insertions, 0 deletions
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. */