summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-21 14:57:41 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:57:41 +0200
commitd4d4a9da832a4c0c5bb080eb3b7c837fc57da31d (patch)
treeb6e8c6c4d4ef04e6f0d80430d3c3fecf2f512ce6 /source4
parent5209a846a9157e649fcdcb561f7eaf19c8c0e465 (diff)
downloadsamba-d4d4a9da832a4c0c5bb080eb3b7c837fc57da31d.tar.gz
samba-d4d4a9da832a4c0c5bb080eb3b7c837fc57da31d.tar.bz2
samba-d4d4a9da832a4c0c5bb080eb3b7c837fc57da31d.zip
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.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/ldb.c4
1 files changed, 2 insertions, 2 deletions
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;
}
}