On 7/13/20 11:49 AM, Daniel Henrique Barboza wrote:
Use g_autofree on strings and remove the 'done' label since
it's
now unneeded.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/libvirt-domain.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 0941caa67f..6adb58a9ef 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -2782,15 +2781,10 @@ virDomainMigrateVersion1(virDomainPtr
domain,
*/
dname = dname ? dname : domain->name;
if (dconn->driver->domainMigrateFinish)
- ddomain = dconn->driver->domainMigrateFinish
+ return dconn->driver->domainMigrateFinish
(dconn, dname, cookie, cookielen, uri, destflags);
else
- ddomain = virDomainLookupByName(dconn, dname);
Might as well remove this else statement and ...
-
- done:
- VIR_FREE(uri_out);
- VIR_FREE(cookie);
- return ddomain;
+ return virDomainLookupByName(dconn, dname);
.. do this return.
Michal