提交 1fcb9351 编写于 作者: P Peter Krempa

storage: sheepdog: Avoid skipping variable initialization

Commit 155ca616 added a error message
that skips initialization of the 'cmd' variable. Fortunately it was not
released.
上级 72352232
......@@ -263,6 +263,7 @@ virStorageBackendSheepdogBuildVol(virConnectPtr conn,
unsigned int flags)
{
int ret = -1;
virCommandPtr cmd = NULL;
virCheckFlags(0, -1);
......@@ -272,7 +273,7 @@ virStorageBackendSheepdogBuildVol(virConnectPtr conn,
goto cleanup;
}
virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "create", vol->name, NULL);
cmd = virCommandNewArgList(COLLIE, "vdi", "create", vol->name, NULL);
virCommandAddArgFormat(cmd, "%llu", vol->target.capacity);
virStorageBackendSheepdogAddHostArg(cmd, pool);
if (virCommandRun(cmd, NULL) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册