summaryrefslogtreecommitdiffstats
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_db.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c
index 6eedccfea58..3050c852dfe 100644
--- a/source3/registry/reg_db.c
+++ b/source3/registry/reg_db.c
@@ -328,7 +328,7 @@ int regdb_close( void )
static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr )
{
- TDB_DATA kbuf, dbuf;
+ TDB_DATA dbuf;
char *buffer;
int i = 0;
uint32 len, buflen;
@@ -373,11 +373,9 @@ static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr )
/* finally write out the data */
- kbuf.dptr = keyname;
- kbuf.dsize = strlen(keyname)+1;
dbuf.dptr = buffer;
dbuf.dsize = len;
- if ( tdb_store( tdb_reg, kbuf, dbuf, TDB_REPLACE ) == -1) {
+ if ( tdb_store_bystring( tdb_reg, keyname, dbuf, TDB_REPLACE ) == -1) {
ret = False;
goto done;
}