[libvirt] [PATCH] virsh: Do not try to free domain if it is NULL
Eric Blake
eblake at redhat.com
Tue Aug 23 13:34:07 UTC 2011
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 at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list