From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVdGP-0005TP-Nz for qemu-devel@nongnu.org; Fri, 05 Aug 2016 07:26:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVdGK-0007Uo-Ly for qemu-devel@nongnu.org; Fri, 05 Aug 2016 07:26:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVdGK-0007Ue-Fz for qemu-devel@nongnu.org; Fri, 05 Aug 2016 07:26:00 -0400 From: Markus Armbruster References: <20160805082421.21994-1-marcandre.lureau@redhat.com> <20160805082421.21994-5-marcandre.lureau@redhat.com> Date: Fri, 05 Aug 2016 13:25:58 +0200 In-Reply-To: <20160805082421.21994-5-marcandre.lureau@redhat.com> (marcandre lureau's message of "Fri, 5 Aug 2016 12:23:49 +0400") Message-ID: <87popnzcc9.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-2.7 v4 04/36] qga: free the whole blacklist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, Michael Roth Copying maintainer. marcandre.lureau@redhat.com writes: > From: Marc-Andr=C3=A9 Lureau > > Free the config blacklist list, not just the elements. Do it so in the > more appropriate function config_free(). > > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > qga/main.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/qga/main.c b/qga/main.c > index 4c3b2c7..bb48214 100644 > --- a/qga/main.c > +++ b/qga/main.c > @@ -1175,6 +1175,7 @@ static void config_free(GAConfig *config) > #ifdef CONFIG_FSFREEZE > g_free(config->fsfreeze_hook); > #endif > + g_list_free_full(config->blacklist, g_free); > g_free(config); > } >=20=20 > @@ -1310,11 +1311,6 @@ static int run_agent(GAState *s, GAConfig *config) > return EXIT_SUCCESS; > } >=20=20 > -static void free_blacklist_entry(gpointer entry, gpointer unused) > -{ > - g_free(entry); > -} > - > int main(int argc, char **argv) > { > int ret =3D EXIT_SUCCESS; > @@ -1379,7 +1375,6 @@ end: > if (s->channel) { > ga_channel_free(s->channel); > } > - g_list_foreach(config->blacklist, free_blacklist_entry, NULL); > g_free(s->pstate_filepath); > g_free(s->state_filepath_isfrozen);