summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/param/loadparm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 345f748384..255bc74594 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7616,9 +7616,12 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f)
break;
case P_OCTAL: {
- char *o = octal_string(*(int *)ptr);
- fprintf(f, "%s", o);
- TALLOC_FREE(o);
+ int val = *(int *)ptr;
+ if (val == -1) {
+ fprintf(f, "-1");
+ } else {
+ fprintf(f, "0%o", val);
+ }
break;
}