提交 bfd25584 编写于 作者: J John Ferlan

secret: Remove local virSecretPtr 'secret'

Remove the need for the local 'secret' in secretConnectListAllSecrets.
A subsequent patch will rename the ObjPtr entry to secret.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 ea86edba
......@@ -576,7 +576,6 @@ secretConnectListAllSecrets(virConnectPtr conn,
virSecretPtr *tmp_secrets = NULL;
int nsecrets = 0;
int ret_nsecrets = 0;
virSecretPtr secret = NULL;
virSecretObjPtr entry = NULL;
size_t i = 0;
int ret = -1;
......@@ -616,12 +615,12 @@ secretConnectListAllSecrets(virConnectPtr conn,
continue;
if (secrets) {
if (!(secret = virGetSecret(conn,
entry->def->uuid,
entry->def->usage_type,
secretUsageIDForDef(entry->def))))
if (!(tmp_secrets[ret_nsecrets] =
virGetSecret(conn,
entry->def->uuid,
entry->def->usage_type,
secretUsageIDForDef(entry->def))))
goto cleanup;
tmp_secrets[ret_nsecrets] = secret;
}
ret_nsecrets++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册