Re: [PATCH] Plug skipped-qemudCleanup leak.

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

 



On Mon, Mar 03, 2008 at 01:34:34PM +0100, Jim Meyering wrote:
> And another:
> 
> 	Plug skipped-qemudCleanup leak.
>         * qemud/qemud.c (main): Call qemudCleanup also upon failure.
>         Otherwise, an error return would skip it and induce leaks.
> 
[...]
> @@ -2166,8 +2166,6 @@ int main(int argc, char **argv) {
> 
>      qemudRunLoop(server);
> 
> -    qemudCleanup(server);
> -
>      close(sigwrite);
> 
>      if (godaemon)
> @@ -2181,6 +2179,7 @@ int main(int argc, char **argv) {
>          unlink (pid_file);
> 
>   error1:
> +    qemudCleanup(server);
>      return ret;
>  }

  Well one could argue that since return on main() is an exit,
which will reclaim the memory it's not really a leak :-) but it's
cleaner that way.

  +1

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

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