From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQWU6-00078A-C5 for qemu-devel@nongnu.org; Tue, 02 Feb 2016 03:38:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQWU3-00025Q-6n for qemu-devel@nongnu.org; Tue, 02 Feb 2016 03:38:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQWU3-00025M-1x for qemu-devel@nongnu.org; Tue, 02 Feb 2016 03:38:47 -0500 From: Markus Armbruster 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> <87zivkz8ec.fsf@blackfin.pond.sub.org> Date: Tue, 02 Feb 2016 09:38:44 +0100 In-Reply-To: <87zivkz8ec.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Mon, 01 Feb 2016 17:45:47 +0100") Message-ID: <87twlrtskr.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 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: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: QEMU Markus Armbruster writes: > Marc-Andr=C3=A9 Lureau writes: > >> Hi >> >> On Fri, Jan 29, 2016 at 4:43 PM, Markus Armbruster w= rote: >>> 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. > > If that's the case, and multiple devices can match, then the callbacks > are all broken. > >> I don't think this needs to change. > > If you mean to say that you don't have to fix it in this series: yes, > but it still needs fixing. If you don't want to fix it, consider adding > a FIXME comment. I'll have some ivshmem work coming up, and will try to remember to include a fix for this. [...]