1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

s3:registry: remove redundant write of zero-lentgh subkey list record

In this case, the zero-lenght list has already been written in step #2.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
This commit is contained in:
Michael Adam 2011-07-01 15:18:12 +02:00
parent eb797bd206
commit 394ca1446e

View File

@ -954,20 +954,6 @@ static NTSTATUS regdb_store_keys_action(struct db_context *db,
num_subkeys = regsubkey_ctr_numkeys(store_ctx->ctr); num_subkeys = regsubkey_ctr_numkeys(store_ctx->ctr);
if (num_subkeys == 0) {
werr = regsubkey_ctr_init(mem_ctx, &subkeys);
W_ERROR_NOT_OK_GOTO_DONE(werr);
werr = regdb_store_keys_internal2(db, store_ctx->key, subkeys);
if (!W_ERROR_IS_OK(werr)) {
DEBUG(0,("regdb_store_keys: Failed to store "
"new record for key [%s]: %s\n",
store_ctx->key, win_errstr(werr)));
goto done;
}
TALLOC_FREE(subkeys);
}
for (i=0; i<num_subkeys; i++) { for (i=0; i<num_subkeys; i++) {
path = talloc_asprintf(mem_ctx, "%s\\%s", store_ctx->key, path = talloc_asprintf(mem_ctx, "%s\\%s", store_ctx->key,
regsubkey_ctr_specific_key(store_ctx->ctr, i)); regsubkey_ctr_specific_key(store_ctx->ctr, i));