diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-19 22:16:03 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-19 22:16:03 +0000 |
commit | 3c0a9c46d8057b9499d7d48a67ba15f9942d558a (patch) | |
tree | 7f0d36ed16565c30afeba9f1dec14c2f3d486391 /source3/registry/reg_frontend.c | |
parent | 12e237da6813ca6a40410c73c75152a840f4ea61 (diff) | |
download | samba-3c0a9c46d8057b9499d7d48a67ba15f9942d558a.tar.gz samba-3c0a9c46d8057b9499d7d48a67ba15f9942d558a.tar.xz samba-3c0a9c46d8057b9499d7d48a67ba15f9942d558a.zip |
fixed seg fault in registry frontend caused by trying to
use a destroyed TALLOC_CTX*
(This used to be commit 432b9f8d7c20fbf3b2a0906c8a93272abbe43fb6)
Diffstat (limited to 'source3/registry/reg_frontend.c')
-rw-r--r-- | source3/registry/reg_frontend.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 3e3ec49425..6090245096 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -248,11 +248,10 @@ char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index ) void regsubkey_ctr_destroy( REGSUBKEY_CTR *ctr ) { - if ( ctr ) - talloc_destroy( ctr->ctx ); - - ctr->num_subkeys = 0; - ctr->subkeys = NULL; + if ( ctr ) { + talloc_destroy( ctr->ctx ); + ZERO_STRUCTP( ctr ); + } } @@ -285,10 +284,9 @@ int regval_ctr_numvals( REGVAL_CTR *ctr ) void regval_ctr_destroy( REGVAL_CTR *ctr ) { - if ( ctr ) + if ( ctr ) { talloc_destroy( ctr->ctx ); - - ctr->num_values = 0; - ctr->values = NULL; + ZERO_STRUCTP( ctr ); + } } |