From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQF1I-00089f-Tu for qemu-devel@nongnu.org; Mon, 01 Feb 2016 08:59:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQF1I-0004ww-2C for qemu-devel@nongnu.org; Mon, 01 Feb 2016 08:59:56 -0500 Received: from mail-ob0-x241.google.com ([2607:f8b0:4003:c01::241]:32835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQF1H-0004wp-T0 for qemu-devel@nongnu.org; Mon, 01 Feb 2016 08:59:55 -0500 Received: by mail-ob0-x241.google.com with SMTP id oj9so8471421obc.0 for ; Mon, 01 Feb 2016 05:59:55 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <87egd075nn.fsf@blackfin.pond.sub.org> References: <1450697444-30119-1-git-send-email-marcandre.lureau@redhat.com> <1450697444-30119-5-git-send-email-marcandre.lureau@redhat.com> <87egd075nn.fsf@blackfin.pond.sub.org> Date: Mon, 1 Feb 2016 14:59:54 +0100 Message-ID: From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/8] libqos: remove some leaks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: QEMU Hi On Fri, Jan 29, 2016 at 4:43 PM, Markus Armbruster wrot= e: > The existing users pass a func that saves dev, and free the saved dev > later. Works as long as we call func() at most once. If multiple > devices match, all but the last one are leaked. Can this happen? It is the responsability of the func() callback to deal with multiple matches. I don't think this needs to change. This fix is only about the case of unmatching devices that need to be free within qpci_device_foreach(). Do you ack that fix? --=20 Marc-Andr=C3=A9 Lureau