[libvirt] [PATCH 3/3] Coverity: Resolve a RESOURCE_LEAK
Eric Blake
eblake at redhat.com
Tue Mar 25 21:00:02 UTC 2014
On 03/25/2014 12:00 PM, John Ferlan wrote:
> On error the lofd would have been leaked.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/lxc/lxc_controller.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> +
> + cleanup:
> VIR_FREE(loname);
> + if (ret == -1)
I might have written 'if (ret < 0)' as that is slightly faster on many
machines, but what you have works.
ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140325/48ef2f1b/attachment-0001.sig>
More information about the libvir-list
mailing list