summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-06-11 22:54:06 +0000
committerSimo Sorce <idra@samba.org>2002-06-11 22:54:06 +0000
commit2d64b9880744746d4317d9da45c575b3a8fbbed1 (patch)
tree7a099c2efd6df22c513ebb3d3f48247ad9747b49 /source3/param
parent366a649d043346a3302516465d41c5151d991b53 (diff)
downloadsamba-2d64b9880744746d4317d9da45c575b3a8fbbed1.tar.gz
samba-2d64b9880744746d4317d9da45c575b3a8fbbed1.tar.bz2
samba-2d64b9880744746d4317d9da45c575b3a8fbbed1.zip
few fixes from Elrond(elrond@samba-tng.org) and Billy O'Connor(billy@oconnoronline.net)
(This used to be commit 88718883e031a3249152861300432dfc895ac587)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 6919f5eced..6ad2c32628 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3422,13 +3422,19 @@ static void lp_save_defaults(void)
break;
case P_STRING:
case P_USTRING:
- parm_table[i].def.svalue =
- strdup(*(char **)parm_table[i].ptr);
+ if (parm_table[i].ptr) {
+ parm_table[i].def.svalue = strdup(*(char **)parm_table[i].ptr);
+ } else {
+ parm_table[i].def.svalue = NULL;
+ }
break;
case P_GSTRING:
case P_UGSTRING:
- parm_table[i].def.svalue =
- strdup((char *)parm_table[i].ptr);
+ if (parm_table[i].ptr) {
+ parm_table[i].def.svalue = strdup((char *)parm_table[i].ptr);
+ } else {
+ parm_table[i].def.svalue = NULL;
+ }
break;
case P_BOOL:
case P_BOOLREV: