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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index add82ae0d4..2dd61f515f 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -28,12 +28,13 @@
/***********************************************************************
Init the talloc context held by a REGSUBKEY_CTR structure
+ This now zero's the structure
**********************************************************************/
void regsubkey_ctr_init( REGSUBKEY_CTR *ctr )
{
- if ( !ctr->ctx )
- ctr->ctx = talloc_init("regsubkey_ctr_init for ctr %p", ctr);
+ ZERO_STRUCTP( ctr );
+ ctr->ctx = talloc_init("regsubkey_ctr_init for ctr %p", ctr);
}
/***********************************************************************
@@ -117,12 +118,13 @@ void regsubkey_ctr_destroy( REGSUBKEY_CTR *ctr )
/***********************************************************************
Init the talloc context held by a REGSUBKEY_CTR structure
+ This now zero's the structure
**********************************************************************/
void regval_ctr_init( REGVAL_CTR *ctr )
{
- if ( ctr && !ctr->ctx )
- ctr->ctx = talloc_init("regval_ctr_init for ctr %p", ctr);
+ ZERO_STRUCTP( ctr );
+ ctr->ctx = talloc_init("regval_ctr_init for ctr %p", ctr);
}
/***********************************************************************