提交 891d0a76 编写于 作者: J John Ferlan

secret: Have virSecretObjNew return locked object

Rather than have caller need to do it, have the object returned locked.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 c520f3f1
......@@ -97,6 +97,8 @@ virSecretObjNew(void)
if (!(secret = virObjectLockableNew(virSecretObjClass)))
return NULL;
virObjectLock(secret);
return secret;
}
......@@ -386,8 +388,6 @@ virSecretObjListAddLocked(virSecretObjListPtr secrets,
if (!(secret = virSecretObjNew()))
goto cleanup;
virObjectLock(secret);
if (virHashAddEntry(secrets->objs, uuidstr, secret) < 0)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册