From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWoyX-0000Nh-0e for qemu-devel@nongnu.org; Tue, 01 Sep 2015 13:04:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWoyU-0000Mc-51 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 13:04:00 -0400 Received: from e19.ny.us.ibm.com ([129.33.205.209]:42943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWoyT-0000MG-VZ for qemu-devel@nongnu.org; Tue, 01 Sep 2015 13:03:58 -0400 Received: from /spool/local by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Sep 2015 13:03:57 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 4573038C8039 for ; Tue, 1 Sep 2015 13:03:54 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t81H3rku44302566 for ; Tue, 1 Sep 2015 17:03:53 GMT Received: from d01av03.pok.ibm.com (localhost [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t81H3r9v030536 for ; Tue, 1 Sep 2015 13:03:53 -0400 From: Michael Roth Date: Tue, 1 Sep 2015 12:00:58 -0500 Message-Id: <1441126866-17199-19-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1441126866-17199-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1441126866-17199-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 0fef3be..720a36d 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; }; @@ -1249,6 +1249,8 @@ end: ga_channel_free(s->channel); } g_list_free_full(s->blacklist, g_free); + g_free(s->pstate_filepath); + g_free(s->state_filepath_isfrozen); if (config->daemonize) { unlink(config->pid_filepath); -- 1.9.1