From d4d4a9da832a4c0c5bb080eb3b7c837fc57da31d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 21 Oct 2008 14:57:41 +0200 Subject: Revert "Registry server LDB backend: Don't make copies of the same type" The original data pointer may go away so we do want to make copies in this case. This reverts commit 625359b2e266105022309df8985720108ecd6f67. --- source4/lib/registry/ldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/registry') diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 9c1f59c4df..018ea86d85 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -72,7 +72,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, case REG_BINARY: if (val != NULL) - *data = *val; + *data = data_blob_talloc(mem_ctx, val->data, val->length); else { data->data = NULL; data->length = 0; @@ -86,7 +86,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, break; default: - *data = *val; + *data = data_blob_talloc(mem_ctx, val->data, val->length); break; } } -- cgit