On Tue, Mar 25, 2014 at 03:00:02PM -0600, Eric Blake wrote:
On 03/25/2014 12:00 PM, John Ferlan wrote:
> On error the lofd would have been leaked.
>
> Signed-off-by: John Ferlan <jferlan(a)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.
As a coding style point we use 'ret < 0' in the vast majority of places,
so we should prefer that over 'ret == -1'
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|