mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
tests: storagevolxml2argvtest: do not reuse cmd
Reduce the scope of the variable to avoid mixing automatic and manual cleanup. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8843cd113e
commit
7e41c10b95
@ -50,7 +50,6 @@ testCompareXMLToArgvFiles(bool shouldFail,
|
|||||||
g_autoptr(virStorageVolDef) vol = NULL;
|
g_autoptr(virStorageVolDef) vol = NULL;
|
||||||
g_autoptr(virStorageVolDef) inputvol = NULL;
|
g_autoptr(virStorageVolDef) inputvol = NULL;
|
||||||
g_autoptr(virStoragePoolDef) inputpool = NULL;
|
g_autoptr(virStoragePoolDef) inputpool = NULL;
|
||||||
g_autoptr(virCommand) cmd = NULL;
|
|
||||||
|
|
||||||
if (!(def = virStoragePoolDefParseFile(poolxml)))
|
if (!(def = virStoragePoolDefParseFile(poolxml)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -88,7 +87,8 @@ testCompareXMLToArgvFiles(bool shouldFail,
|
|||||||
convertStep = VIR_STORAGE_VOL_ENCRYPT_CREATE;
|
convertStep = VIR_STORAGE_VOL_ENCRYPT_CREATE;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
virCommandFree(cmd);
|
g_autoptr(virCommand) cmd = NULL;
|
||||||
|
|
||||||
cmd = virStorageBackendCreateQemuImgCmdFromVol(obj, vol,
|
cmd = virStorageBackendCreateQemuImgCmdFromVol(obj, vol,
|
||||||
inputvol, flags,
|
inputvol, flags,
|
||||||
create_tool,
|
create_tool,
|
||||||
|
Loading…
Reference in New Issue
Block a user