Re: [libvirt] [PATCH] Domain/Net object cleanups after remote error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cole Robinson wrote:
> Domain and Net objects were not being cleaned up properly
> when reporting errors from the remote driver. Attached patch
> fixes this.
> 

Stupid typo. Correct patch attached.

- Cole

diff --git a/src/remote_internal.c b/src/remote_internal.c
index 51e8eb7..80f6ce6 100644
--- a/src/remote_internal.c
+++ b/src/remote_internal.c
@@ -4606,6 +4606,10 @@ server_error (virConnectPtr conn, remote_error *err)
                      err->str3 ? *err->str3 : NULL,
                      err->int1, err->int2,
                      "%s", err->message ? *err->message : NULL);
+    if (dom)
+        virDomainFree(dom);
+    if (net)
+        virNetworkFree(net);
 }
 
 /* get_nonnull_domain and get_nonnull_network turn an on-wire
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]