mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 13:17:58 +03:00
storage: sheepdog: Avoid skipping variable initialization
Commit 155ca616eb
added a error message
that skips initialization of the 'cmd' variable. Fortunately it was not
released.
This commit is contained in:
parent
723522328f
commit
1fcb9351d7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user