From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqTV-0007wM-T5 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 14:40:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWqTR-0006l7-Mi for qemu-devel@nongnu.org; Tue, 01 Sep 2015 14:40:05 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:56701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqTR-0006iC-4r for qemu-devel@nongnu.org; Tue, 01 Sep 2015 14:40:01 -0400 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Sep 2015 12:40:00 -0600 Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 535CF19D803E for ; Tue, 1 Sep 2015 12:30:52 -0600 (MDT) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t81Ictf541943142 for ; Tue, 1 Sep 2015 11:38:55 -0700 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t81IduXh007804 for ; Tue, 1 Sep 2015 12:39:56 -0600 From: Michael Roth Date: Tue, 1 Sep 2015 13:38:55 -0500 Message-Id: <1441132743-26228-19-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1441132743-26228-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1441132743-26228-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 18/26] qga: free a bit more List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Michael Roth , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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 Reviewed-by: Denis V. Lunev Signed-off-by: Michael Roth --- qga/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index b5859bb..fc07696 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; }; @@ -1254,6 +1254,8 @@ end: 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); if (config->daemonize) { unlink(config->pid_filepath); -- 1.9.1