From a14c02d2a7b9d070a6338a360103a34e7673454c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 23 Jul 2012 12:20:26 +0930 Subject: source3/loadparm: make struct loadparm_service a talloc object. This gives us a place to allocate members from. Signed-off-by: Rusty Russell Signed-off-by: Andrew Bartlett --- source3/param/loadparm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 1cbac61fcc..a4d5bfc551 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1511,6 +1511,7 @@ static void free_service_byindex(int idx) } free_service(ServicePtrs[idx]); + talloc_free_children(ServicePtrs[idx]); } /*************************************************************************** @@ -1551,7 +1552,7 @@ static int add_a_service(const struct loadparm_service *pservice, const char *na return (-1); } ServicePtrs = tsp; - ServicePtrs[iNumServices] = SMB_MALLOC_P(struct loadparm_service); + ServicePtrs[iNumServices] = talloc(NULL, struct loadparm_service); if (!ServicePtrs[iNumServices]) { DEBUG(0,("add_a_service: out of memory!\n")); return (-1); -- cgit