From 78576117eb4292e4e2750928d5f84c2edc94192f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 15 Jul 2009 12:50:55 +0200 Subject: s3:registry: flush the provided subkey_ctr in regdb_fetch_keys_internal() This way, we always return what has really been read from the db, and not more. The callers assume exactly this, but one could hand in an already pre-filled subkey container... Michael --- source3/registry/reg_backend_db.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/registry') diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 7825edd5c2..9fd5c3161b 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -1474,6 +1474,9 @@ static WERROR regdb_fetch_keys_internal(struct db_context *db, const char *key, buflen = value.dsize; len = tdb_unpack( buf, buflen, "d", &num_items); + werr = regsubkey_ctr_reinit(ctr); + W_ERROR_NOT_OK_GOTO_DONE(werr); + for (i=0; i