summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c3
1 files changed, 2 insertions, 1 deletions
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);