summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-06-24 01:41:38 +0000
committerSimo Sorce <idra@samba.org>2001-06-24 01:41:38 +0000
commitcc6bf9a06f0629f16ab455ad30b6c7b1a76ac0c2 (patch)
tree92fdf04a0bbe07ac65de4932cced9e498e51ea77 /source3/param
parent08bda36755d75bc4f9a7e0354a93085b4f9ace66 (diff)
downloadsamba-cc6bf9a06f0629f16ab455ad30b6c7b1a76ac0c2.tar.gz
samba-cc6bf9a06f0629f16ab455ad30b6c7b1a76ac0c2.tar.bz2
samba-cc6bf9a06f0629f16ab455ad30b6c7b1a76ac0c2.zip
fixed error
using wrong pointer to test and free s/str/s/ (This used to be commit 7e5a9860fad92fee79bcc20f2ea2a3728080dba2)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 72856ddafe..4ba219adbf 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3683,12 +3683,11 @@ char **lp_list_make(char *string)
if (!string || !*string) return NULL;
s = strdup(string);
- if (!str || !*str) return NULL;
- str = s;
+ if (!s || !*s) return NULL;
list = (char**)malloc(((sizeof(char**)) * P_LIST_ABS));
if (!list) {
- free (str);
+ free (s);
return NULL;
}
memset (list, 0, ((sizeof(char**)) * P_LIST_ABS));
@@ -3696,6 +3695,7 @@ char **lp_list_make(char *string)
num = 0;
+ str = s;
while (*str)
{
if (!next_token(&str, tok, LIST_SEP, sizeof(pstring))) continue;
@@ -3705,7 +3705,7 @@ char **lp_list_make(char *string)
rlist = (char **)realloc(list, ((sizeof(char **)) * lsize));
if (!rlist) {
lp_list_free (list);
- free (str);
+ free (s);
return NULL;
}
else list = rlist;
@@ -3715,7 +3715,7 @@ char **lp_list_make(char *string)
list[num] = strdup(tok);
if (!list[num]) {
lp_list_free (list);
- free (str);
+ free (s);
return NULL;
}