summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-07 19:58:31 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-07 19:58:31 -0400
commit34a6841e024911e983d0bd3697e80229f5d3bc0d (patch)
tree4f1ae6c1f1e1351b79fefbf66056da3e9222d420 /src/map.c
parent38414900e1fb821e81f553d3b1dcb61cf2cd5ad8 (diff)
downloadslapi-nis-34a6841e024911e983d0bd3697e80229f5d3bc0d.tar.gz
slapi-nis-34a6841e024911e983d0bd3697e80229f5d3bc0d.tar.xz
slapi-nis-34a6841e024911e983d0bd3697e80229f5d3bc0d.zip
- free the domain list after the last domain's maps are gone
Diffstat (limited to 'src/map.c')
-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. */