From: Kirill Shchetiniuk <[email protected]>

Signed-off-by: Kirill Shchetiniuk <[email protected]>
---
 src/qemu/qemu_migration.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 881133caed..d8c5f57d90 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3852,7 +3852,7 @@ qemuMigrationDstPrepareTunnel(virQEMUDriver *driver,
 static virURI *
 qemuMigrationAnyParseURI(const char *uri, bool *wellFormed)
 {
-    char *tmp = NULL;
+    g_autofree char *tmp = NULL;
     virURI *parsed;
 
     /* For compatibility reasons tcp://... URIs are sent as tcp:...
@@ -3865,7 +3865,6 @@ qemuMigrationAnyParseURI(const char *uri, bool 
*wellFormed)
     parsed = virURIParse(uri);
     if (parsed && wellFormed)
         *wellFormed = !tmp;
-    VIR_FREE(tmp);
 
     return parsed;
 }
-- 
2.49.0

Reply via email to