summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_objects.c54
-rw-r--r--source3/registry/reg_objects.h2
2 files changed, 0 insertions, 56 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index c27685c97e..7c64569c3c 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -345,60 +345,6 @@ int regval_ctr_numvals(struct regval_ctr *ctr)
return ctr->num_values;
}
-/***********************************************************************
- allocate memory for and duplicate a struct regval_blob.
- This is malloc'd memory so the caller should free it when done
- **********************************************************************/
-
-struct regval_blob* dup_registry_value(struct regval_blob *val)
-{
- struct regval_blob *copy = NULL;
-
- if ( !val )
- return NULL;
-
- if ( !(copy = SMB_MALLOC_P( struct regval_blob)) ) {
- DEBUG(0,("dup_registry_value: malloc() failed!\n"));
- return NULL;
- }
-
- /* copy all the non-pointer initial data */
-
- memcpy( copy, val, sizeof(struct regval_blob) );
-
- copy->size = 0;
- copy->data_p = NULL;
-
- if ( val->data_p && val->size )
- {
- if ( !(copy->data_p = (uint8_t *)memdup( val->data_p,
- val->size )) ) {
- DEBUG(0,("dup_registry_value: memdup() failed for [%d] "
- "bytes!\n", val->size));
- SAFE_FREE( copy );
- return NULL;
- }
- copy->size = val->size;
- }
-
- return copy;
-}
-
-/**********************************************************************
- free the memory allocated to a struct regval_blob
- *********************************************************************/
-
-void free_registry_value(struct regval_blob *val)
-{
- if ( !val )
- return;
-
- SAFE_FREE( val->data_p );
- SAFE_FREE( val );
-
- return;
-}
-
/**********************************************************************
*********************************************************************/
diff --git a/source3/registry/reg_objects.h b/source3/registry/reg_objects.h
index a84bc8a80b..144e97fcfc 100644
--- a/source3/registry/reg_objects.h
+++ b/source3/registry/reg_objects.h
@@ -47,8 +47,6 @@ int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32_t key_index );
WERROR regval_ctr_init(TALLOC_CTX *mem_ctx, struct regval_ctr **ctr);
int regval_ctr_numvals(struct regval_ctr *ctr);
-struct regval_blob* dup_registry_value(struct regval_blob *val);
-void free_registry_value(struct regval_blob *val);
uint8_t* regval_data_p(struct regval_blob *val);
uint32_t regval_size(struct regval_blob *val);
char* regval_name(struct regval_blob *val);