From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSskn-00085A-U2 for qemu-devel@nongnu.org; Thu, 28 Jul 2016 17:22:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSskj-00017L-NE for qemu-devel@nongnu.org; Thu, 28 Jul 2016 17:22:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSskj-00017B-E5 for qemu-devel@nongnu.org; Thu, 28 Jul 2016 17:22:01 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19CC2C0EA417 for ; Thu, 28 Jul 2016 21:22:01 +0000 (UTC) References: <20160728143808.13707-1-marcandre.lureau@redhat.com> <20160728143808.13707-5-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <579A7778.6060402@redhat.com> Date: Thu, 28 Jul 2016 15:22:00 -0600 MIME-Version: 1.0 In-Reply-To: <20160728143808.13707-5-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8kdqf0hvqrnHEWMlKPlsXBPqC4MBrKWWp" Subject: Re: [Qemu-devel] [PATCH v2 04/37] qga: free remaining leaking state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8kdqf0hvqrnHEWMlKPlsXBPqC4MBrKWWp From: Eric Blake To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Message-ID: <579A7778.6060402@redhat.com> Subject: Re: [PATCH v2 04/37] qga: free remaining leaking state References: <20160728143808.13707-1-marcandre.lureau@redhat.com> <20160728143808.13707-5-marcandre.lureau@redhat.com> In-Reply-To: <20160728143808.13707-5-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/28/2016 08:37 AM, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > qga/guest-agent-command-state.c | 7 +++++++ > qga/guest-agent-core.h | 1 + > qga/main.c | 6 ++++++ > 3 files changed, 14 insertions(+) >=20 > diff --git a/qga/guest-agent-command-state.c b/qga/guest-agent-command-= state.c > index 4de229c..56e63b1 100644 > --- a/qga/guest-agent-command-state.c > +++ b/qga/guest-agent-command-state.c > @@ -71,3 +71,10 @@ GACommandState *ga_command_state_new(void) > cs->groups =3D NULL; > return cs; > } > + > +void ga_command_state_free(GACommandState *cs) > +{ > + g_slist_foreach(cs->groups, (GFunc)g_free, NULL); Here, the ugly cast is because we don't have a static forwarder function with the correct signature handy. Hmm, I wonder if it is worth adding a static inline forwarder function in one of our headers that ALL files can use, when they want to use a 2-arg callback that merely calls g_free() on its first argument and ignores the second, since we have now proved it is a commonly-used forwarder. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8kdqf0hvqrnHEWMlKPlsXBPqC4MBrKWWp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXmnd4AAoJEKeha0olJ0NqWTEH/Ap9HLBthIaIeB5p3sHV5NtN qyknV7LCxXoMYbMYLQ+xzgSn4y+pFGZd3UIs9/cckNZyBpUOmwNn76qF3C0oVB2U JzFwgWD/tkKSpRTirw+pq40gjVJcSDlndzfajFw912VD2dG47bWrgnfIcQxpZQ5B hH9DpE/xN+IJuxoYOEXFZXa4yhk/mOTMvdmE669jEOTmGmxo3DFxpLvhZwXVS2Iz Tlv8vTtKi2U+unG1VQDaAal83iVrhaKct7Oki/dgZFkTjo+ia7H6GpEWCdqDU0w8 bwDu1PdricYn+AK2YL08RBeKRu+Z8Jui90QZABASCYh7CfDHarlLA1SuLG7ANnY= =lvbQ -----END PGP SIGNATURE----- --8kdqf0hvqrnHEWMlKPlsXBPqC4MBrKWWp--