summaryrefslogtreecommitdiff
path: root/source3/registry/reg_objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry/reg_objects.c')
-rw-r--r--source3/registry/reg_objects.c54
1 files changed, 0 insertions, 54 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;
-}
-
/**********************************************************************
*********************************************************************/