Received: from eggs.gnu.org ([2001:4830:134:3::10]:45466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYVj8-0007Vw-Bc for qemu-devel@nongnu.org; Thu, 19 Mar 2015 04:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYVj5-0007Ze-1W for qemu-devel@nongnu.org; Thu, 19 Mar 2015 04:22:50 -0400 Message-ID: <550A8755.60308@msgid.tls.msk.ru> Date: Thu, 19 Mar 2015 11:22:45 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1426172243-7830-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1426172243-7830-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vl: fix resource leak with monitor_fdset_add_fd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org 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