libgpo: default to empty values if none are there
[sfrench/samba-autobuild/.git] / libgpo / gpo_ini.c
index 0d45dbb2de4cb7268dadefba271144e55cdd73f8..95673bce13a7e257e9ded80603625b42510511cc 100644 (file)
@@ -56,7 +56,7 @@ static bool store_keyval_pair(const char *key, const char *value, void *ctx_ptr)
        }
 
        ctx->data[ctx->keyval_count]->key = talloc_asprintf(ctx, "%s:%s", ctx->current_section, key);
-       ctx->data[ctx->keyval_count]->val = talloc_strdup(ctx, value);
+       ctx->data[ctx->keyval_count]->val = talloc_strdup(ctx, value ? value : "");
 
        if (!ctx->data[ctx->keyval_count]->key ||
            !ctx->data[ctx->keyval_count]->val) {