summaryrefslogtreecommitdiff
path: root/source3/libgpo/gpo_filesync.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-08 12:25:47 +0100
committerGünther Deschner <gd@samba.org>2008-01-08 12:26:25 +0100
commit17e8104d9b0032dd3a7aa7242bc23f2021723e07 (patch)
treebd38f6634355950a5c8916172ccde6fa604a71c5 /source3/libgpo/gpo_filesync.c
parent4a056e127ac35d640d899cd8a4735b927aa8d005 (diff)
downloadsamba-17e8104d9b0032dd3a7aa7242bc23f2021723e07.tar.gz
samba-17e8104d9b0032dd3a7aa7242bc23f2021723e07.tar.bz2
samba-17e8104d9b0032dd3a7aa7242bc23f2021723e07.zip
Correctly talloc ctx->remote_path in libgpo (thanks Michael for the pointer).
Guenther (This used to be commit 2ea57a76a6bc8f9c835818780fcc9324896d5c1f)
Diffstat (limited to 'source3/libgpo/gpo_filesync.c')
-rw-r--r--source3/libgpo/gpo_filesync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libgpo/gpo_filesync.c b/source3/libgpo/gpo_filesync.c
index 9f6557ef32..03d5286fae 100644
--- a/source3/libgpo/gpo_filesync.c
+++ b/source3/libgpo/gpo_filesync.c
@@ -166,7 +166,7 @@ static void gpo_sync_func(const char *mnt,
}
old_nt_dir = ctx->remote_path;
- ctx->remote_path = nt_dir;
+ ctx->remote_path = talloc_strdup(ctx->mem_ctx, nt_dir);
old_unix_dir = ctx->local_path;
ctx->local_path = talloc_strdup(ctx->mem_ctx, unix_dir);
@@ -174,7 +174,7 @@ static void gpo_sync_func(const char *mnt,
ctx->mask = talloc_asprintf(ctx->mem_ctx,
"%s\\*",
nt_dir);
- if (!ctx->local_path || !ctx->mask) {
+ if (!ctx->local_path || !ctx->mask || !ctx->remote_path) {
DEBUG(0,("gpo_sync_func: ENOMEM\n"));
return;
}