summaryrefslogtreecommitdiff
path: root/source4/lib/registry/common
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-04-11 23:34:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:13 -0500
commit9d6a284567b832eee6fd47ac48c3471e69c0cc17 (patch)
treea66ba9bd82c79f53f4ee5ecf3536f883163591f3 /source4/lib/registry/common
parent639afabf404d469638bc521b8a7f37e541ccf834 (diff)
downloadsamba-9d6a284567b832eee6fd47ac48c3471e69c0cc17.tar.gz
samba-9d6a284567b832eee6fd47ac48c3471e69c0cc17.tar.bz2
samba-9d6a284567b832eee6fd47ac48c3471e69c0cc17.zip
r169: Fix gregedit
(This used to be commit 32036375de58327a673a5a85cedb01e8ddfa503a)
Diffstat (limited to 'source4/lib/registry/common')
-rw-r--r--source4/lib/registry/common/reg_objects.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/source4/lib/registry/common/reg_objects.c b/source4/lib/registry/common/reg_objects.c
index 809829b3e8..78260e198f 100644
--- a/source4/lib/registry/common/reg_objects.c
+++ b/source4/lib/registry/common/reg_objects.c
@@ -34,31 +34,8 @@
REG_VAL* reg_val_dup( REG_VAL *val )
{
- REG_VAL *copy = NULL;
- TALLOC_CTX *new_mem_ctx = talloc_init(val->name);
-
- if ( !val )
- return NULL;
-
- if ( !(copy = talloc( new_mem_ctx, sizeof(REG_VAL) )) ) {
- DEBUG(0,("dup_registry_value: malloc() failed!\n"));
- return NULL;
- }
-
- /* copy all the non-pointer initial data */
-
- memcpy( copy, val, sizeof(REG_VAL) );
- if ( val->data_blk )
- {
- if ( !(copy->data_blk = talloc_memdup( new_mem_ctx, val->data_blk, val->data_len )) ) {
- DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n",
- val->data_len));
- SAFE_FREE( copy );
- }
- }
- copy->mem_ctx = new_mem_ctx;
-
- return copy;
+ val->ref++;
+ return val;
}
/**********************************************************************