qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH] vl: fix resource leak with monitor_fdset_add_


From: Michael Tokarev
Subject: Re: [Qemu-trivial] [PATCH] vl: fix resource leak with monitor_fdset_add_fd
Date: Thu, 19 Mar 2015 11:22:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0

12.03.2015 17:57, Paolo Bonzini wrote:
> monitor_fdset_add_fd returns an AddfdInfo struct (used by the QMP
> command add_fd).  Free it.

Applied to -trivial, with a tiny change:

> +    fdinfo = monitor_fdset_add_fd(dupfd, true, fdset_id, fd_opaque ? true : 
> false,
> +                                  fd_opaque, NULL);

    fdinfo = monitor_fdset_add_fd(dupfd, true, fdset_id,
                                  fd_opaque ? true : false, fd_opaque, NULL);

(this fits in 80 chars a line).  Another variant is to use `fd_opaque != NULL' 
here
instead of this ?true:false construct.

Thanks,

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]