From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUfY7-0006l8-T8 for qemu-devel@nongnu.org; Wed, 26 Aug 2015 14:35:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUfY2-0005uv-TZ for qemu-devel@nongnu.org; Wed, 26 Aug 2015 14:35:51 -0400 Received: from mx2.parallels.com ([199.115.105.18]:49607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUfY2-0005ua-Nr for qemu-devel@nongnu.org; Wed, 26 Aug 2015 14:35:46 -0400 References: <1440583525-21632-1-git-send-email-marcandre.lureau@redhat.com> <1440583525-21632-10-git-send-email-marcandre.lureau@redhat.com> From: "Denis V. Lunev" Message-ID: <55DE06FA.10206@parallels.com> Date: Wed, 26 Aug 2015 21:35:38 +0300 MIME-Version: 1.0 In-Reply-To: <1440583525-21632-10-git-send-email-marcandre.lureau@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 09/12] qga: free a bit more List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com On 08/26/2015 01:05 PM, marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau > > Now that main() has a single exit point, we can free a few > more allocations. > > Signed-off-by: Marc-André Lureau > --- > qga/main.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/qga/main.c b/qga/main.c > index 118847c..58f2fc7 100644 > --- a/qga/main.c > +++ b/qga/main.c > @@ -82,7 +82,7 @@ struct GAState { > bool delimit_response; > bool frozen; > GList *blacklist; > - const char *state_filepath_isfrozen; > + char *state_filepath_isfrozen; > struct { > const char *log_filepath; > const char *pid_filepath; > @@ -90,7 +90,7 @@ struct GAState { > #ifdef CONFIG_FSFREEZE > const char *fsfreeze_hook; > #endif > - const gchar *pstate_filepath; > + gchar *pstate_filepath; > GAPersistentState pstate; > }; > > @@ -1253,6 +1253,8 @@ end: > if (s->channel) { > ga_channel_free(s->channel); > } > + g_free(s->pstate_filepath); > + g_free(s->state_filepath_isfrozen); > > if (config->daemonize) { > unlink(config->pid_filepath); Reviewed-by: Denis V. Lunev