1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

Correctly talloc ctx->remote_path in libgpo (thanks Michael for the pointer).

Guenther
(This used to be commit 2ea57a76a6bc8f9c835818780fcc9324896d5c1f)
This commit is contained in:
Günther Deschner 2008-01-08 12:25:47 +01:00
parent 4a056e127a
commit 17e8104d9b

View File

@ -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;
}