From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUkE8-0005Lu-FC for qemu-devel@nongnu.org; Wed, 26 Aug 2015 19:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUkE7-0006Ad-HG for qemu-devel@nongnu.org; Wed, 26 Aug 2015 19:35:32 -0400 Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:33796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUkE6-0006AN-Sl for qemu-devel@nongnu.org; Wed, 26 Aug 2015 19:35:30 -0400 Received: by qgeg42 with SMTP id g42so1823928qge.1 for ; Wed, 26 Aug 2015 16:35:30 -0700 (PDT) Sender: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= From: marcandre.lureau@redhat.com Date: Thu, 27 Aug 2015 01:34:56 +0200 Message-Id: <1440632099-5169-11-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1440632099-5169-1-git-send-email-marcandre.lureau@redhat.com> References: <1440632099-5169-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v4 10/13] qga: free a bit more List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: den@openvz.org, mdroth@linux.vnet.ibm.com, =?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 --- qga/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 6518e1f..710dd47 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(ga_state->blacklist, g_free); + g_free(s->pstate_filepath); + g_free(s->state_filepath_isfrozen); if (config->daemonize) { unlink(config->pid_filepath); -- 2.4.3