]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmbconf: more sanely print multi_sz values in registry backend
authorMichael Adam <obnox@samba.org>
Tue, 8 Apr 2008 20:23:57 +0000 (22:23 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 9 Apr 2008 23:28:59 +0000 (01:28 +0200)
Michael

source/lib/smbconf/smbconf_reg.c

index e604a608e16b19d47372688ac8033d93c6410847..dada8eece02415a9e61b19f4a95419f4b8d3b58d 100644 (file)
@@ -337,8 +337,8 @@ static char *smbconf_format_registry_value(TALLOC_CTX *mem_ctx,
        case REG_MULTI_SZ: {
                uint32 j;
                for (j = 0; j < value->v.multi_sz.num_strings; j++) {
-                       result = talloc_asprintf(mem_ctx, "%s \"%s\" ",
-                                                result,
+                       result = talloc_asprintf(mem_ctx, "%s\"%s\" ",
+                                                result ? result : "" ,
                                                 value->v.multi_sz.strings[j]);
                        if (result == NULL) {
                                break;