From 7010365e9ac5f9a285b5ad7b660a3c49ff0e8c17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Mon, 20 Apr 2009 19:15:32 +0200 Subject: [PATCH] libgpo: Fix some minor issues. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner --- libgpo/gpo_fetch.c | 3 ++- libgpo/gpo_ini.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c index beedfc22801..06c730cfa38 100644 --- a/libgpo/gpo_fetch.c +++ b/libgpo/gpo_fetch.c @@ -114,7 +114,7 @@ static NTSTATUS gpo_prepare_local_store(TALLOC_CTX *mem_ctx, } while (next_token_talloc(mem_ctx, &unix_path, &tok, "/")) { - if (strequal(tok, cache_dir)) { + if (strequal(tok, GPO_CACHE_DIR)) { break; } } @@ -212,6 +212,7 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx, result = gpo_connect_server(ads, lp_ctx, server, service, &cli); + NT_STATUS_NOT_OK_RETURN(result); result = gpo_prepare_local_store(mem_ctx, cache_dir, unix_path); diff --git a/libgpo/gpo_ini.c b/libgpo/gpo_ini.c index af2b88c0b8a..674c741bbac 100644 --- a/libgpo/gpo_ini.c +++ b/libgpo/gpo_ini.c @@ -42,6 +42,7 @@ static bool store_keyval_pair(const char *key, const char *value, void *ctx_ptr) { struct gp_inifile_context *ctx = (struct gp_inifile_context *) ctx_ptr; ctx->data = talloc_realloc(ctx, ctx->data, struct keyval_pair *, ctx->keyval_count+1); + ctx->data[ctx->keyval_count] = talloc_zero(ctx, struct keyval_pair); 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->keyval_count++; -- 2.34.1