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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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