summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-14 10:08:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:51 -0500
commit8c76eb2672343007bc5de60487e01a87fd76f799 (patch)
treed9f76392ac6da0ed413032b3f3642748b22c47f2 /source4
parent4e43af6c69645c2c48586a1c5ebb92869d69e910 (diff)
downloadsamba-8c76eb2672343007bc5de60487e01a87fd76f799.tar.gz
samba-8c76eb2672343007bc5de60487e01a87fd76f799.tar.bz2
samba-8c76eb2672343007bc5de60487e01a87fd76f799.zip
r5395: fixed some loadparm memory leaks
(This used to be commit b75f8fe1844c539d8a4e369225bcbe0e6f81e9de)
Diffstat (limited to 'source4')
-rw-r--r--source4/param/loadparm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 23551bd1c6..4d6282573b 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -1444,7 +1444,7 @@ const char **lp_parm_string_list(int lookup_service, const char *type, const cha
const char *value = get_parametrics(lookup_service, type, option);
if (value)
- return str_list_make(NULL, value, separator);
+ return str_list_make(talloc_autofree_context(), value, separator);
return NULL;
}
@@ -1862,7 +1862,8 @@ static void copy_service(service * pserviceDest, service * pserviceSource, BOOL
strupper(*(char **)dest_ptr);
break;
case P_LIST:
- *(const char ***)dest_ptr = str_list_copy(NULL, *(const char ***)src_ptr);
+ *(const char ***)dest_ptr = str_list_copy(talloc_autofree_context(),
+ *(const char ***)src_ptr);
break;
default:
break;
@@ -2374,7 +2375,8 @@ BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
break;
case P_LIST:
- *(const char ***)parm_ptr = str_list_make(NULL, pszParmValue, NULL);
+ *(const char ***)parm_ptr = str_list_make(talloc_autofree_context(),
+ pszParmValue, NULL);
break;
case P_STRING:
@@ -2934,7 +2936,7 @@ static void lp_save_defaults(void)
continue;
switch (parm_table[i].type) {
case P_LIST:
- parm_table[i].def.lvalue = str_list_copy(NULL,
+ parm_table[i].def.lvalue = str_list_copy(talloc_autofree_context(),
*(const char ***)parm_table[i].ptr);
break;
case P_STRING: