From 0205633ed94a19d8723c3f2f252daf1b96729375 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 28 Mar 2010 14:13:48 +0200 Subject: s3: Use bitmap_talloc in loadparm --- source3/param/loadparm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index c7497c4d04..b0f78f98a0 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -6091,7 +6091,7 @@ static void free_service(struct service *pservice) free_parameters(pservice); string_free(&pservice->szService); - bitmap_free(pservice->copymap); + TALLOC_FREE(pservice->copymap); free_param_opts(&pservice->param_opt); @@ -7572,10 +7572,11 @@ static bool handle_printing(int snum, const char *pszParmValue, char **ptr) static void init_copymap(struct service *pservice) { int i; - if (pservice->copymap) { - bitmap_free(pservice->copymap); - } - pservice->copymap = bitmap_allocate(NUMPARAMETERS); + + TALLOC_FREE(pservice->copymap); + + pservice->copymap = bitmap_talloc(talloc_autofree_context(), + NUMPARAMETERS); if (!pservice->copymap) DEBUG(0, ("Couldn't allocate copymap!! (size %d)\n", -- cgit