diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-23 12:20:26 +0930 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-07 23:20:05 +1000 |
commit | a14c02d2a7b9d070a6338a360103a34e7673454c (patch) | |
tree | ac35ce5fd70a9fe4a71ae8f1f41a1e0ca2a57cdd /source3 | |
parent | 592e3f4b236b3b5c056faca6ca6f060560a3204d (diff) | |
download | samba-a14c02d2a7b9d070a6338a360103a34e7673454c.tar.gz samba-a14c02d2a7b9d070a6338a360103a34e7673454c.tar.bz2 samba-a14c02d2a7b9d070a6338a360103a34e7673454c.zip |
source3/loadparm: make struct loadparm_service a talloc object.
This gives us a place to allocate members from.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/param/loadparm.c | 3 |
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); |