From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAGVL-0007Fs-6s for qemu-devel@nongnu.org; Wed, 01 Jul 2015 07:48:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAGVH-0005P6-SM for qemu-devel@nongnu.org; Wed, 01 Jul 2015 07:48:39 -0400 Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:33890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAGVH-0005P2-OG for qemu-devel@nongnu.org; Wed, 01 Jul 2015 07:48:35 -0400 Received: by qkeo142 with SMTP id o142so26978103qke.1 for ; Wed, 01 Jul 2015 04:48:35 -0700 (PDT) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 1 Jul 2015 13:47:44 +0200 Message-Id: <1435751267-26378-10-git-send-email-marcandre.lureau@gmail.com> In-Reply-To: <1435751267-26378-1-git-send-email-marcandre.lureau@gmail.com> References: <1435751267-26378-1-git-send-email-marcandre.lureau@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 09/12] qga: free a bit more List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , mdroth@linux.vnet.ibm.com 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 aaf0e10..bd87050 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; }; @@ -1224,6 +1224,8 @@ end: if (s->channel) { ga_channel_free(s->channel); } + g_free(s->pstate_filepath); + g_free(s->state_filepath_isfrozen); if (daemonize) { unlink(pid_filepath); -- 2.4.3