No need to open code now that we have a nice function.
* src/qemu/qemu_command.c (qemuParseCommandLinePid): Simplify cleanup.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/qemu/qemu_command.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index bc55859..6c5f247 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -11777,11 +11777,7 @@ virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
cleanup:
VIR_FREE(exepath);
- for (i = 0; progargv && progargv[i]; i++)
- VIR_FREE(progargv[i]);
- VIR_FREE(progargv);
- for (i = 0; progenv && progenv[i]; i++)
- VIR_FREE(progenv[i]);
- VIR_FREE(progenv);
+ virStringFreeList(progargv);
+ virSTringFreeList(progenv);
return def;
}
--
1.8.3.1