From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMQg-0006iJ-EE for qemu-devel@nongnu.org; Tue, 25 Aug 2015 18:10:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUMQe-0002ew-9G for qemu-devel@nongnu.org; Tue, 25 Aug 2015 18:10:54 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:34803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMQe-0002eq-4p for qemu-devel@nongnu.org; Tue, 25 Aug 2015 18:10:52 -0400 Received: by qkfh127 with SMTP id h127so109479493qkf.1 for ; Tue, 25 Aug 2015 15:10:51 -0700 (PDT) Sender: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= From: marcandre.lureau@redhat.com Date: Wed, 26 Aug 2015 00:10:21 +0200 Message-Id: <1440540624-7998-10-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1440540624-7998-1-git-send-email-marcandre.lureau@redhat.com> References: <1440540624-7998-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 v2 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 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); -- 2.4.3