Re: [PATCH] virsh: Do not try to free domain if it is NULL

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

 



On 08/22/2011 09:54 PM, Osier Yang wrote:
Without these patch, there will be error like below if domain
is NULL.

error: invalid domain pointer in virDomainFree

Which is useless.
---
  tools/virsh.c |   12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)


-out:
-    virDomainFree(dom);
+cleanup:
+    if (dom) virDomainFree(dom);

Split this into two lines:
    if (dom)
        virDomainFree(dom);

ACK with that style fix.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
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]