mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +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) inputvol = NULL;
|
||||
g_autoptr(virStoragePoolDef) inputpool = NULL;
|
||||
g_autoptr(virCommand) cmd = NULL;
|
||||
|
||||
if (!(def = virStoragePoolDefParseFile(poolxml)))
|
||||
goto cleanup;
|
||||
@ -88,7 +87,8 @@ testCompareXMLToArgvFiles(bool shouldFail,
|
||||
convertStep = VIR_STORAGE_VOL_ENCRYPT_CREATE;
|
||||
|
||||
do {
|
||||
virCommandFree(cmd);
|
||||
g_autoptr(virCommand) cmd = NULL;
|
||||
|
||||
cmd = virStorageBackendCreateQemuImgCmdFromVol(obj, vol,
|
||||
inputvol, flags,
|
||||
create_tool,
|
||||
|
Loading…
Reference in New Issue
Block a user