diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-02-09 11:06:13 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-02-17 12:19:29 +0100 |
commit | 3b5326e987e3fe1f57502cbfd9d25b14cdf2b434 (patch) | |
tree | 6dd3bd233f533a77fb79b281e00caa87fc0545b4 /source3/registry | |
parent | c35a7e8c478062de0d5d6771b59e0430cd9706c3 (diff) | |
download | samba-3b5326e987e3fe1f57502cbfd9d25b14cdf2b434.tar.gz samba-3b5326e987e3fe1f57502cbfd9d25b14cdf2b434.tar.bz2 samba-3b5326e987e3fe1f57502cbfd9d25b14cdf2b434.zip |
s3-registry Remove unused dup_registry_value() and free_registry_value()
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_objects.c | 54 | ||||
-rw-r--r-- | source3/registry/reg_objects.h | 2 |
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); |